aboutsummaryrefslogtreecommitdiffstats
path: root/checks/timer.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-08-31 03:44:50 +0000
committerlloyd <[email protected]>2008-08-31 03:44:50 +0000
commit4602c3cbed029bbdda399b40ff3b1e9675fa2ff4 (patch)
tree0eed9e8649d752eb11b0f9fdbfe93e560a2f13a5 /checks/timer.h
parentfcf22c70fd3c7eea182459d55e4289f9f72ec8ab (diff)
Inline some methods of Timer
Randomly generate the RW keys as well, removing all need for the keys/ dir
Diffstat (limited to 'checks/timer.h')
-rw-r--r--checks/timer.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/checks/timer.h b/checks/timer.h
index 80aeec9e6..47bd7696e 100644
--- a/checks/timer.h
+++ b/checks/timer.h
@@ -20,12 +20,12 @@ class Timer
void stop();
- u64bit value();
- double seconds();
- double milliseconds();
+ u64bit value() { stop(); return time_used; }
+ double seconds() { return milliseconds() / 1000.0; }
+ double milliseconds() { return value() / 1000000.0; }
- double ms_per_event();
- double seconds_per_event();
+ double ms_per_event() { return milliseconds() / events(); }
+ double seconds_per_event() { return seconds() / events(); }
u32bit events() const { return event_count; }
std::string get_name() const { return name; }