summaryrefslogtreecommitdiff
path: root/timing.h
diff options
context:
space:
mode:
Diffstat (limited to 'timing.h')
-rw-r--r--timing.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/timing.h b/timing.h
index 9a80df2f..7e1029ea 100644
--- a/timing.h
+++ b/timing.h
@@ -20,6 +20,9 @@ class timing_t
timing_t(const std::string& _symbol, const std::string& _category)
: begin(0), cumulative(0), symbol(_symbol), category(_category) {}
+ timing_t(const std::string& _symbol)
+ : begin(0), cumulative(0), symbol(_symbol) {}
+
~timing_t() {
std::string cls = "timing.results.";
cls += symbol;
@@ -33,6 +36,9 @@ class timing_t
line = _line;
begin = std::clock();
}
+ void start() {
+ begin = std::clock();
+ }
void stop() {
cumulative += std::clock() - begin;