diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-23 12:34:52 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-23 12:34:52 +0200 |
commit | 866441314a5dd6294a1e396d9f24f3dfdef8f953 (patch) | |
tree | 2f6e78fcc8626549fae753c7f5abbab9bac7e330 /FTNoIR_Tracker_PT | |
parent | e246c43fc97171d3c70310684a1335ed231ceed0 (diff) |
fix Unix frame counter
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'FTNoIR_Tracker_PT')
-rw-r--r-- | FTNoIR_Tracker_PT/timer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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;
}
|