36 PROCESS(test_ctimer_process,
"Callback timer test process");
37 AUTOSTART_PROCESSES(&test_ctimer_process);
39 static struct ctimer ct;
40 static uint16_t counter = 0;
46 printf(
"Callback function called at time %lu (counter=%i)\n",
clock_time(), counter);
54 printf(
"Starting callback timer test process (counter=%i)\n", counter);
#define PROCESS_BEGIN()
Define the beginning of a process.
#define NULL
The null pointer.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
CCIF clock_time_t clock_time(void)
Get the current clock time.
void ctimer_set(struct ctimer *c, clock_time_t t, void(*f)(void *), void *ptr)
Set a callback timer.
#define PROCESS(name, strname)
Declare a process.
Header file for the callback timer
#define CLOCK_SECOND
A second, measured in system clock time.