From 50112711928817328be07117dcfc3fea9196441a Mon Sep 17 00:00:00 2001 From: ulion Date: Mon, 5 May 2008 00:35:30 +0000 Subject: Remove useless variable startup_time, since we do not need it any more. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26672 b3059339-0415-0410-9bf9-f77b7e298cf2 --- osdep/timer-darwin.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'osdep/timer-darwin.c') diff --git a/osdep/timer-darwin.c b/osdep/timer-darwin.c index b8fe380e0c..4eb973a0c7 100644 --- a/osdep/timer-darwin.c +++ b/osdep/timer-darwin.c @@ -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 @@ int usec_sleep(int usec_delay) /* 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 @@ void InitTimer() 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 -- cgit v1.2.3