4 #include <sys/time.h>
\r
7 void spend_cycles(int c);
\r
11 struct timeval tval; // timing
\r
12 int thissec = 0, frames_done = 0;
\r
18 gettimeofday(&tval, 0);
\r
20 if(thissec != tval.tv_sec)
\r
22 thissec = tval.tv_sec;
\r
24 printf("frames_done: %i\n", frames_done);
\r
29 //gp2x_video_wait_vsync();
\r
30 //usleep(1); // sleeps a minimum of ~20ms
\r
31 //gp2x_video_flip(); // can be called ~430000 times/sec
\r