From 1538a796e1202dc9769565a6f7556adcea877478 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 25 Oct 2013 23:00:25 +0200 Subject: PT: fix for Windows framerate display Signed-off-by: Stanislaw Halik --- FTNoIR_Tracker_PT/timer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FTNoIR_Tracker_PT') 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 } -- cgit v1.2.3