diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-24 16:17:12 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-24 16:17:12 +0100 |
commit | c0088b3d4b115d6e40c98f9a142f13f08babe7a0 (patch) | |
tree | 70c9104081316bdae77a5ccc831b839cf9f1db8e /opentrack | |
parent | aa0549fd18134f5d8fc4046ab32b46352ad379a3 (diff) |
timer: split start/elapsed. convert uses
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/timer.hpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/opentrack/timer.hpp b/opentrack/timer.hpp index 93c0a1f4..1b52b6c8 100644 --- a/opentrack/timer.hpp +++ b/opentrack/timer.hpp @@ -51,12 +51,8 @@ public: Timer() { start(); } - long start() { - struct timespec cur; - (void) clock_gettime(CLOCK_MONOTONIC, &cur); - long ret = conv(cur); - state = cur; - return ret; + void start() { + (void) clock_gettime(CLOCK_MONOTONIC, &state); } long elapsed() { struct timespec cur; |