Schedule a SIGALRM delivery after the specified period in milliseconds. * If a timer is already scheduled, this function will re-schedule it to the * specified time. If period is 0 the current timer is disabled. */
| 1929 | * If a timer is already scheduled, this function will re-schedule it to the |
| 1930 | * specified time. If period is 0 the current timer is disabled. */ |
| 1931 | void watchdogScheduleSignal(int period) { |
| 1932 | struct itimerval it; |
| 1933 | |
| 1934 | /* Will stop the timer if period is 0. */ |
| 1935 | it.it_value.tv_sec = period/1000; |
| 1936 | it.it_value.tv_usec = (period%1000)*1000; |
| 1937 | /* Don't automatically restart. */ |
| 1938 | it.it_interval.tv_sec = 0; |
| 1939 | it.it_interval.tv_usec = 0; |
| 1940 | setitimer(ITIMER_REAL, &it, NULL); |
| 1941 | } |
| 1942 | |
| 1943 | /* Enable the software watchdog with the specified period in milliseconds. */ |
| 1944 | void enableWatchdog(int period) { |
no outgoing calls
no test coverage detected