47 #include "contiki-conf.h"
48 #include "sys/clock.h"
66 t->interval = interval;
86 t->start += t->interval;
125 clock_time_t diff = (
clock_time() - t->start) + 1;
126 return t->interval < diff;
void timer_restart(struct timer *t)
Restart the timer from the current point in time.
void timer_set(struct timer *t, clock_time_t interval)
Set a timer.
CCIF clock_time_t clock_time(void)
Get the current clock time.
clock_time_t timer_remaining(struct timer *t)
The time until the timer expires.
Timer library header file.
int timer_expired(struct timer *t)
Check if a timer has expired.
void timer_reset(struct timer *t)
Reset the timer with the same interval.