From 866441314a5dd6294a1e396d9f24f3dfdef8f953 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 23 Oct 2013 12:34:52 +0200 Subject: fix Unix frame counter Signed-off-by: Stanislaw Halik --- FTNoIR_Tracker_PT/timer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'FTNoIR_Tracker_PT/timer.cpp') diff --git a/FTNoIR_Tracker_PT/timer.cpp b/FTNoIR_Tracker_PT/timer.cpp index ed7606e5..a3141113 100644 --- a/FTNoIR_Tracker_PT/timer.cpp +++ b/FTNoIR_Tracker_PT/timer.cpp @@ -58,9 +58,9 @@ double Timer::elapsed() if(running) gettimeofday(&endCount, NULL); - startTime = (startCount.tv_sec * 1e3) + startCount.tv_usec; - endTime = (endCount.tv_sec * 1e3) + endCount.tv_usec; + startTime = (startCount.tv_sec) + startCount.tv_usec * 1e-6; + endTime = (endCount.tv_sec) + endCount.tv_usec * 1e-6; #endif - return endTime - startTime; + return (endTime - startTime) * 1e3; } -- cgit v1.2.3