determines if task is due
| 98 | |
| 99 | // determines if task is due |
| 100 | static bool CRON_TaskDue |
| 101 | ( |
| 102 | const CRON_TASK *t |
| 103 | ) { |
| 104 | ASSERT(t != NULL); |
| 105 | |
| 106 | struct timespec now; |
| 107 | clock_gettime(CLOCK_REALTIME, &now); |
| 108 | return cmp_timespec(now, t->due) >= 0; |
| 109 | } |
| 110 | |
| 111 | static CRON_TASK *CRON_Peek() { |
| 112 | pthread_mutex_lock(&cron->mutex); |
no test coverage detected