Lines Matching defs:ticks
214 /* number of timer ticks in a Musec = 2^20 usecs */
291 printf("HAT test on @ %d Hz = %d ticks\n", HATHZ, hatCount);
311 unsigned current, ticks, oldlo;
321 ticks = timer0last - current;
323 ticks = timer0last + (TIMER0_ROLLOVER - current);
329 if (oldlo > (timer0count.lo = oldlo + ticks)) /* carry? */
341 static int ticks = 0;
356 ++ticks;
358 if (testHatOn && ((ticks & 0x3f) == 0)) {
368 } else if (!testHatOn && (ticks & 0x1ff) == 0) {
401 calculate delay ticks
402 - made the time to calculate delay ticks almost negligible. 4 multiplies
422 int ticks, otick;
455 ticks = gettick();
456 if (ticks > otick)
457 nticks -= TIMER0_ROLLOVER - (ticks - otick);
459 nticks -= otick - ticks;
460 otick = ticks;
480 int ticks;
494 * (loopcount * timer clock speed) / (counter ticks * 1000)
496 ticks = 0xFFFF - gettick();
497 if (ticks == 0) ticks = 1; /* just in case */
498 if (ticks < (TIMER_MUSECDIV(1024))) { /* not accurate enough */
499 guess *= uimax(2, (TIMER_MUSECDIV(1024) / ticks));
502 count1024usec = (guess * (TIMER_MUSECDIV(1024))) / ticks;