diff options
Diffstat (limited to 'contrib/epee/include/profile_tools.h')
-rw-r--r-- | contrib/epee/include/profile_tools.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/epee/include/profile_tools.h b/contrib/epee/include/profile_tools.h index d3b1e4db4..f285fe48b 100644 --- a/contrib/epee/include/profile_tools.h +++ b/contrib/epee/include/profile_tools.h @@ -57,8 +57,15 @@ namespace epee #define TIME_MEASURE_START(var_name) uint64_t var_name = epee::misc_utils::get_tick_count(); +#define TIME_MEASURE_PAUSE(var_name) var_name = epee::misc_utils::get_tick_count() - var_name; +#define TIME_MEASURE_RESTART(var_name) var_name = epee::misc_utils::get_tick_count() - var_name; #define TIME_MEASURE_FINISH(var_name) var_name = epee::misc_utils::get_tick_count() - var_name; +#define TIME_MEASURE_NS_START(var_name) uint64_t var_name = epee::misc_utils::get_ns_count(); +#define TIME_MEASURE_NS_PAUSE(var_name) var_name = epee::misc_utils::get_ns_count() - var_name; +#define TIME_MEASURE_NS_RESTART(var_name) var_name = epee::misc_utils::get_ns_count() - var_name; +#define TIME_MEASURE_NS_FINISH(var_name) var_name = epee::misc_utils::get_ns_count() - var_name; + namespace profile_tools { struct local_call_account |