summaryrefslogtreecommitdiffhomepage
path: root/opentrack/timer.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-24 16:17:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-24 16:17:12 +0100
commitc0088b3d4b115d6e40c98f9a142f13f08babe7a0 (patch)
tree70c9104081316bdae77a5ccc831b839cf9f1db8e /opentrack/timer.hpp
parentaa0549fd18134f5d8fc4046ab32b46352ad379a3 (diff)
timer: split start/elapsed. convert uses
Diffstat (limited to 'opentrack/timer.hpp')
-rw-r--r--opentrack/timer.hpp8
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;