mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 17:32:33 +00:00
perf_timer: add non scoped start/stop timer defines
This commit is contained in:
parent
ada4291469
commit
fe1202646c
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue