From 493e6197ff19593c79483b7d34284b683656c242 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 18 Oct 2014 07:03:00 +0200 Subject: timer: start() has to return elapsed before exiting Reported-by: @brokenhands Issue: #79 Breakage-of: pt-tracker --- facetracknoir/timer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'facetracknoir') 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() { -- cgit v1.2.3