summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-25 23:00:25 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-25 23:00:25 +0200
commit1538a796e1202dc9769565a6f7556adcea877478 (patch)
tree5e6ab45156d51e5adb7e853871a84c02c98856a1
parentaba4019cb6c33dce5ed1b2b637c8a1e8df76508b (diff)
PT: fix for Windows framerate display
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
-rw-r--r--FTNoIR_Tracker_PT/timer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/FTNoIR_Tracker_PT/timer.cpp b/FTNoIR_Tracker_PT/timer.cpp
index a3141113..080dd713 100644
--- a/FTNoIR_Tracker_PT/timer.cpp
+++ b/FTNoIR_Tracker_PT/timer.cpp
@@ -54,13 +54,13 @@ double Timer::elapsed()
startTime = startCount.QuadPart * (1e3 / frequency.QuadPart);
endTime = endCount.QuadPart * (1e3 / frequency.QuadPart);
+ return endTime - startTime;
#else
if(running)
gettimeofday(&endCount, NULL);
startTime = (startCount.tv_sec) + startCount.tv_usec * 1e-6;
endTime = (endCount.tv_sec) + endCount.tv_usec * 1e-6;
-#endif
-
return (endTime - startTime) * 1e3;
+#endif
}