diff options
Diffstat (limited to 'timing.h')
-rw-r--r-- | timing.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |