void *OSystem_Android::timerThreadFunc(void *arg) { OSystem_Android *system = (OSystem_Android *)arg; DefaultTimerManager *timer = (DefaultTimerManager *)(system->_timerManager); // renice this thread to boost the audio thread if (setpriority(PRIO_PROCESS, 0, 19) < 0) LOGW("couldn't renice the timer thread"); JNI::attachThread(); struct timespec tv; tv.tv_sec = 0; tv.tv_nsec = 10 * 1000 * 1000; // 10ms while (!system->_timer_thread_exit) { if (JNI::pause) { LOGD("timer thread going to sleep"); sem_wait(&JNI::pause_sem); LOGD("timer thread woke up"); } timer->handler(); nanosleep(&tv, 0); } JNI::detachThread(); return 0; }
static void timerThreadFunc(void *arg) { OSystem_3DS *osys = (OSystem_3DS *)arg; DefaultTimerManager *tm = (DefaultTimerManager *)osys->getTimerManager(); while (!osys->exiting) { g_system->delayMillis(10); tm->handler(); } }
// ******************************************************************************************** static Uint32 timer_handler_wrapper(Uint32 interval) { DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager(); tm->handler(); return interval; }
int timer_handler(int t) { DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager(); tm->handler(); return t; }
int OSystem_IPHONE::timerHandler(int t) { DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager(); tm->handler(); return t; }