Lines Matching defs:timer
30 * DESCRIPTION: list of timer callbacks
42 static GLUTtimer *__glutTimerList = 0; // list of timer callbacks
48 * DESCRIPTION: register a new timer callback
53 GLUTtimer *timer, *other;
60 timer = freeTimerList;
61 freeTimerList = timer->next;
63 timer = new GLUTtimer();
64 if (!timer)
68 timer->func = timerFunc;
69 timer->value = value;
70 timer->next = NULL;
71 timer->timeout = system_time() + (interval*1000); // 1000 ticks in a millisecond
74 while (other && (other->timeout < timer->timeout)) {
78 timer->next = other;
79 *prevptr = timer;
91 GLUTtimer *timer;
97 timer = __glutTimerList;
100 timer->func(timer->value);
103 __glutTimerList = timer->next;
104 timer->next = freeTimerList;
105 freeTimerList = timer;