Beispiel #1
0
int main(int argc, char **argv)
{
    timer_init();

    timer_add(&timer, TIMER_PERIODIC, 1000, &timer_callback);
    timer_add(&timer2, TIMER_PERIODIC, 2000, &timer2_callback);

    timer_start(&timer);
    timer_start(&timer2);

    while (1) {
        timer_task();
    }

    return 0;
}
Beispiel #2
0
/**
 * This function is there for compatibility issue between the original
 * "timer_task" definition and the requested prototype by the macro DEFINE_TASK
 * from the file "microkernel/task.h"
 */
void timer_task_port(void)
{
	extern void timer_task(int dummy1, int dummy2);
	timer_task(0, 0);
}