aboutsummaryrefslogtreecommitdiffstats
path: root/checks/timer.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-05 12:46:18 +0000
committerlloyd <[email protected]>2008-09-05 12:46:18 +0000
commite292d9c1263fc74c26b26b9bd6f879ab25cc19ee (patch)
tree73953a1061223fc65e9236d232caf04bbc5a1aa4 /checks/timer.h
parenta8973ceb0c0f70e67e30b1c36e4ed833bc158445 (diff)
Use the Timer class for all benchmarking
Diffstat (limited to 'checks/timer.h')
-rw-r--r--checks/timer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/checks/timer.h b/checks/timer.h
index 47bd7696e..4bdc08154 100644
--- a/checks/timer.h
+++ b/checks/timer.h
@@ -14,7 +14,7 @@ class Timer
public:
static u64bit get_clock();
- Timer(const std::string& name);
+ Timer(const std::string& name, u32bit event_mult = 1);
void start();
@@ -27,12 +27,12 @@ class Timer
double ms_per_event() { return milliseconds() / events(); }
double seconds_per_event() { return seconds() / events(); }
- u32bit events() const { return event_count; }
+ u32bit events() const { return event_count * event_mult; }
std::string get_name() const { return name; }
private:
std::string name;
u64bit time_used, timer_start;
- u32bit event_count;
+ u32bit event_count, event_mult;
};
inline bool operator<(const Timer& x, const Timer& y)