6 static uint64 desiredfps;
8 void RefreshThrottleFPS(void)
10 desiredfps=FCEUI_GetDesiredFPS()>>8;
12 tfreq<<=16; /* Adjustment for fps returned from FCEUI_GetDesiredFPS(). */
15 static uint64 GetCurTime(void)
21 ret=(uint64)tv.tv_sec*1000000;
26 void SpeedThrottle(void)
28 static uint64 ttime,ltime;
34 if( (ttime-ltime) < (tfreq/desiredfps) )
36 if( (ttime-ltime) >= (tfreq*4/desiredfps))
39 ltime+=tfreq/desiredfps;