/*following functions are architecture dependent */ void tl_update_time(void) { #ifdef POOL_SOUND update_sound(); #endif #ifdef HAVE_UCLOCK currenttime=uclock(); #else #ifdef USE_CLOCK currenttime=clock(); #else #ifdef HAVE_GETTIMEOFDAY do { gettimeofday(¤ttime, &tzp); } while (currenttime.tv_usec > 999999); #else #ifdef HAVE_FTIME ftime(¤ttime); #endif #endif #endif #endif #ifdef _plan9_ currenttime = plan9_msec(); #endif }
/*following functions are architecture dependent */ void tl_update_time (void) { #ifdef __BEOS__ currenttime = system_time (); #else #ifdef _WIN32 QueryPerformanceCounter (¤ttime); #else #ifdef USE_ALLEGRO if (allegromode) { if (counter == -1) { LOCK_VARIABLE (counter); LOCK_FUNCTION (timer); install_int (timer, 1000 / TICKSPERSEC); ainstalled = 1; counter = 0; } currenttime = counter; return; } #endif #ifdef HAVE_UCLOCK currenttime = uclock (); #else #ifdef USE_CLOCK currenttime = clock (); #else #ifdef HAVE_GETTIMEOFDAY do { gettimeofday (¤ttime, &tzp); } while (currenttime.tv_usec > 999999); #else #ifdef HAVE_FTIME ftime (¤ttime); #endif #endif #endif #endif #endif #endif #ifdef _plan9_ currenttime = plan9_msec (); #endif }