From cca552c123e6522541b15e7cf4f51f3ec0fcf564 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 May 2014 19:49:21 +0300 Subject: Improve profiler speed. --- src/utils/perfomance.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils/perfomance.h') diff --git a/src/utils/perfomance.h b/src/utils/perfomance.h index c88859730..4a5f4fc17 100644 --- a/src/utils/perfomance.h +++ b/src/utils/perfomance.h @@ -31,6 +31,7 @@ #include "localconsts.h" #define PROFILER_START() Perfomance::start(); +#define PROFILER_END() Perfomance::flush(); #define BLOCK_START(name) Perfomance::blockStart(name); #define BLOCK_END(name) Perfomance::blockEnd(name); #define FUNC_BLOCK(name, id) Perfomance::Func PerfomanceFunc##id(name); @@ -47,6 +48,8 @@ namespace Perfomance void blockEnd(const std::string &name); + void flush(); + class Func final { public: @@ -68,6 +71,7 @@ namespace Perfomance #else // USE_PROFILER #define PROFILER_START() +#define PROFILER_END() #define BLOCK_START(name) #define BLOCK_END(name) #define FUNC_BLOCK(name, id) -- cgit v1.2.3-60-g2f50