Lines Matching refs:timer
115 GLUTtimer *timer, *other;
127 timer = freeTimerList;
128 freeTimerList = timer->next;
130 timer = (GLUTtimer *) malloc(sizeof(GLUTtimer));
131 if (!timer)
135 timer->func = timerFunc;
138 timer->timeout.val = interval * TICKS_PER_MILLISECOND;
140 timer->timeout.tv_sec = (int) interval / 1000;
141 timer->timeout.tv_usec = (int) (interval % 1000) * 1000;
143 timer->value = value;
144 timer->next = NULL;
146 ADD_TIME(timer->timeout, timer->timeout, now);
149 while (other && IS_AFTER(other->timeout, timer->timeout)) {
153 timer->next = other;
155 __glutNewTimer = timer; /* for Fortran binding! */
157 *prevptr = timer;
168 GLUTtimer *timer;
174 timer = __glutTimerList;
175 /* call the timer function */
176 timer->func(timer->value);
178 __glutTimerList = timer->next;
179 /* put this timer on the "free" list */
180 timer->next = freeTimerList;
181 freeTimerList = timer;
901 /* We need an event flag for the timer. */