iOS/libraries/allegro/allegro/src/psp/ptimer.c
/* psp_timer_thread:
 *  This PSP thread measures the elapsed time.
 */
This PSP thread measures the elapsed time.
This PSP thread measures the elapsed time .
static int psp_timer_thread()
{
   uint64_t old_tick, new_tick;
   int interval;
   long delay;
   sceRtcGetCurrentTick(&old_tick);
   while (psp_timer_on) {
      sceRtcGetCurrentTick(&new_tick);
      interval = PSPTIMER_TO_TIMER(new_tick - old_tick);
      old_tick = new_tick;
      delay = _handle_timer_tick(interval);
      sceKernelDelayThreadCB(TIMER_TO_USEC(delay));
   }
   sceKernelExitThread(0);
   return 0;
}
static int psp_timer_thread ( ) { uint64_t old_tick , new_tick ; int interval ; long delay ; sceRtcGetCurrentTick ( & old_tick ) ; while ( psp_timer_on ) { sceRtcGetCurrentTick ( & new_tick ) ; interval = PSPTIMER_TO_TIMER ( new_tick - old_tick ) ; old_tick = new_tick ; delay = _handle_timer_tick ( interval ) ; sceKernelDelayThreadCB ( TIMER_TO_USEC ( delay ) ) ; } sceKernelExitThread ( 0 ) ; return 0 ; }
psp_timer_thread:
  This PSP thread measures the elapsed time.
psp_timer_thread : This PSP thread measures the elapsed time .
/* Calculate actual time elapsed. */ /* Handle a tick and rest. */