6 static uint64 desiredfps;
8 void RefreshThrottleFPS(void)
10 uint64 f=FCEUI_GetDesiredFPS();
11 // great, a bit faster than before
15 tfreq<<=16; /* Adjustment for fps returned from FCEUI_GetDesiredFPS(). */
18 static uint64 GetCurTime(void)
24 ret=(uint64)tv.tv_sec*1000000;
29 INLINE void SpeedThrottle(void)
31 static uint64 ttime,ltime;
37 if( (ttime-ltime) < (tfreq/desiredfps) )
41 if( (ttime-ltime) >= (tfreq*4/desiredfps))
44 ltime+=tfreq/desiredfps;