aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-30 16:45:40 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-07 19:23:14 +0000
commitfe1202646cfd713a1717229962158f7c15b434a6 (patch)
tree6370c0ee286bef9ad0a2964b92f8b8bf650c9ed4
parentadd a version of ge_double_scalarmult_precomp_vartime with A precomp (diff)
downloadmonero-fe1202646cfd713a1717229962158f7c15b434a6.tar.xz
perf_timer: add non scoped start/stop timer defines
Diffstat (limited to '')
-rw-r--r--src/common/perf_timer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/perf_timer.h b/src/common/perf_timer.h
index bc8e05800..4d7d99afb 100644
--- a/src/common/perf_timer.h
+++ b/src/common/perf_timer.h
@@ -94,5 +94,8 @@ void set_performance_timer_log_level(el::Level level);
#define PERF_TIMER_UNIT_L(name, unit, l) tools::PerformanceTimer pt_##name(#name, unit, l)
#define PERF_TIMER(name) PERF_TIMER_UNIT(name, 1000)
#define PERF_TIMER_L(name, l) PERF_TIMER_UNIT_L(name, 1000, l)
+#define PERF_TIMER_START_UNIT(name, unit) tools::PerformanceTimer *pt_##name = new tools::PerformanceTimer(#name, unit, el::Level::Info)
+#define PERF_TIMER_START(name) PERF_TIMER_START_UNIT(name, 1000)
+#define PERF_TIMER_STOP(name) do { delete pt_##name; pt_##name = NULL; } while(0)
}