summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/timer.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-18 07:03:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-18 07:10:32 +0200
commit493e6197ff19593c79483b7d34284b683656c242 (patch)
treeff5ad74f3081076cf02c4db5f206511016df4dff /facetracknoir/timer.hpp
parent8012733bbda634f1449b2a03272a5f3c08d727ab (diff)
timer: start() has to return elapsed before exiting
Reported-by: @brokenhands Issue: #79 Breakage-of: pt-tracker
Diffstat (limited to 'facetracknoir/timer.hpp')
-rw-r--r--facetracknoir/timer.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/facetracknoir/timer.hpp b/facetracknoir/timer.hpp
index 35ccd4cc..628365c9 100644
--- a/facetracknoir/timer.hpp
+++ b/facetracknoir/timer.hpp
@@ -53,8 +53,8 @@ public:
long start() {
struct timespec cur;
(void) clock_gettime(CLOCK_MONOTONIC, &cur);
+ long ret = conv(cur);
state = cur;
- int ret = conv(cur);
return ret;
}
long elapsed() {