Lines Matching defs:timer
25 * DESCRIPTION: list of timer callbacks
37 static GLUTtimer *__glutTimerList = 0; // list of timer callbacks
43 * DESCRIPTION: register a new timer callback
48 GLUTtimer *timer, *other;
55 timer = freeTimerList;
56 freeTimerList = timer->next;
58 timer = new GLUTtimer();
59 if (!timer)
63 timer->func = timerFunc;
64 timer->value = value;
65 timer->next = NULL;
66 timer->timeout = system_time() + (interval*1000); // 1000 ticks in a millisecond
69 while (other && (other->timeout < timer->timeout)) {
73 timer->next = other;
74 *prevptr = timer;
86 GLUTtimer *timer;
92 timer = __glutTimerList;
95 timer->func(timer->value);
98 __glutTimerList = timer->next;
99 timer->next = freeTimerList;
100 freeTimerList = timer;