| 103 | } |
| 104 | |
| 105 | static timer_t |
| 106 | make_timer() |
| 107 | { |
| 108 | timer_t timerid = 0; |
| 109 | struct sigevent sev; |
| 110 | |
| 111 | setup_handler(); |
| 112 | |
| 113 | sev.sigev_notify = SIGEV_SIGNAL; |
| 114 | sev.sigev_signo = g_sig_num; |
| 115 | sev.sigev_value.sival_ptr = &timerid; |
| 116 | if (timer_create(CLOCKID, &sev, &timerid) == -1) { |
| 117 | handleError("timer_create"); |
| 118 | } |
| 119 | |
| 120 | return timerid; |
| 121 | } |
| 122 | |
| 123 | static void |
| 124 | start_stop_timer(timer_t timerid, long interval, bool start) |
no test coverage detected