From 9e68cfc6ad40a1ca6bd07b1e455782347ce2f0ac Mon Sep 17 00:00:00 2001 From: gimmedonutnow Date: Tue, 1 Aug 2006 18:21:53 +0000 Subject: [PATCH] - this file is obsolete --- src/drivers/sdl/throttle.cpp | 41 ------------------------------------ 1 file changed, 41 deletions(-) delete mode 100644 src/drivers/sdl/throttle.cpp diff --git a/src/drivers/sdl/throttle.cpp b/src/drivers/sdl/throttle.cpp deleted file mode 100644 index 422dad79..00000000 --- a/src/drivers/sdl/throttle.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include "main.h" -#include "throttle.h" - -static uint64 tfreq; -static uint64 desiredfps; - -void RefreshThrottleFPS(void) -{ - desiredfps=FCEUI_GetDesiredFPS()>>8; - tfreq=1000000; - tfreq<<=16; /* Adjustment for fps returned from FCEUI_GetDesiredFPS(). */ -} - -static uint64 GetCurTime(void) -{ - uint64 ret; - struct timeval tv; - - gettimeofday(&tv,0); - ret=(uint64)tv.tv_sec*1000000; - ret+=tv.tv_usec; - return(ret); -} - -void SpeedThrottle(void) -{ - static uint64 ttime,ltime=0; - - waiter: - - ttime=GetCurTime(); - - if( (ttime-ltime) < (tfreq/desiredfps) ) - goto waiter; - if( (ttime-ltime) >= (tfreq*4/desiredfps)) - ltime=ttime; - else - ltime+=tfreq/desiredfps; -} -