no-thread option, coalesced tunnel lut, more accurate fps counter
[fbgfx] / src / main.c
index 4d63726..7c41e2e 100644 (file)
@@ -61,7 +61,9 @@ int main(void)
 
                scr_update();
                scr_draw();
-               ++num_frames;
+               if(time_msec >= 4000) {
+                       ++num_frames;
+               }
        }
 
        time_msec = get_time_msec() - start_msec;
@@ -70,7 +72,7 @@ end:
        fbev_shutdown();
        fbgfx_restore_video_mode();
        if(num_frames && time_msec) {
-               printf("\ravg framerate: %.1f\n", (float)num_frames / ((float)time_msec / 1000.0));
+               printf("\ravg framerate: %.1f\n", (float)num_frames / ((float)(time_msec - 4000) / 1000.0));
        }
        return 0;
 }