-#ifdef FPS
-#include <sys/time.h>
-uint64 frcount;
-#endif
-void FCEUI_Emulate(void)
-{
- #ifdef FPS
- uint64 starttime,end;
- struct timeval tv;
- frcount=0;
- gettimeofday(&tv,0);
- starttime=((uint64)tv.tv_sec*1000000)+tv.tv_usec;
- #endif
- EmLoop();
-
- #ifdef FPS
- // Probably won't work well on Windows port; for
- // debugging/speed testing.
- {
- uint64 w;
- int i,frac;
- gettimeofday(&tv,0);
- end=((uint64)tv.tv_sec*1000000)+tv.tv_usec;
- w=frcount*10000000000LL/(end-starttime);
- i=w/10000;
- frac=w-i*10000;
- printf("Average FPS: %d.%04d\n",i,frac);
- }
- #endif
-
-}
-