# HG changeset patch # User ulion # Date 1209947730 0 # Node ID 503c2fd0c88bf7ae86c373e9b3634dd62f84f17f # Parent 00dee59d921d73b9355453bfd3706215ad8318d8 Remove useless variable startup_time, since we do not need it any more. diff -r 00dee59d921d -r 503c2fd0c88b osdep/timer-darwin.c --- a/osdep/timer-darwin.c Sun May 04 20:22:03 2008 +0000 +++ b/osdep/timer-darwin.c Mon May 05 00:35:30 2008 +0000 @@ -27,7 +27,7 @@ #include "timer.h" /* global variables */ -static double relative_time, startup_time; +static double relative_time; static double timebase_ratio; const char *timer_name = "Darwin accurate"; @@ -54,13 +54,13 @@ /* current time in microseconds */ unsigned int GetTimer() { - return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e6); + return (unsigned int)(uint64_t)(mach_absolute_time() * timebase_ratio * 1e6); } /* current time in milliseconds */ unsigned int GetTimerMS() { - return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e3); + return (unsigned int)(uint64_t)(mach_absolute_time() * timebase_ratio * 1e3); } /* time spent between now and last call in seconds */ @@ -85,8 +85,7 @@ timebase_ratio = (double)timebase.numer / (double)timebase.denom * (double)1e-9; - relative_time = startup_time = - (double)(mach_absolute_time() * timebase_ratio); + relative_time = (double)(mach_absolute_time() * timebase_ratio); } #if 0