summaryrefslogtreecommitdiff
path: root/fps.c
diff options
context:
space:
mode:
Diffstat (limited to 'fps.c')
-rw-r--r--fps.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fps.c b/fps.c
index 4379e38..ca2787a 100644
--- a/fps.c
+++ b/fps.c
@@ -14,14 +14,11 @@ GLPong_FPSInit() {
start = SDL_GetTicks();
}
-void
+INLINE GLfloat
GLPong_FPSCount() {
- // 10.0f is the number of frames we let draw before calculating FPS
- fps = 10.0f / (SDL_GetTicks() - start) * 1000; // 1 sec / 1 millisec == 1000
+ /* 10.0f is the number of frames we let draw before calculating FPS */
+ fps = 10.0f / (SDL_GetTicks() - start) * 1000; /* 1 sec / 1 millisec == 1000 */
start = SDL_GetTicks();
+ return fps;
}
-void
-GLPong_FPSPrint() {
- printf("%.2f frames per second\n", fps);
-}