10
src/debug.h
10
src/debug.h
@@ -99,9 +99,9 @@ std::string GetDebugString();
|
||||
* machines. Mainly useful for local optimisations.
|
||||
**/
|
||||
#define TIC() {\
|
||||
uint64 _xxx_ = ottd_rdtsc();\
|
||||
static uint64 _sum_ = 0;\
|
||||
static uint32 _i_ = 0;
|
||||
uint64_t _xxx_ = ottd_rdtsc();\
|
||||
static uint64_t _sum_ = 0;\
|
||||
static uint32_t _i_ = 0;
|
||||
|
||||
#define TOC(str, count)\
|
||||
_sum_ += ottd_rdtsc() - _xxx_;\
|
||||
@@ -115,8 +115,8 @@ std::string GetDebugString();
|
||||
/* Chrono based version. The output is in microseconds. */
|
||||
#define TICC() {\
|
||||
auto _start_ = std::chrono::high_resolution_clock::now();\
|
||||
static uint64 _sum_ = 0;\
|
||||
static uint32 _i_ = 0;
|
||||
static uint64_t _sum_ = 0;\
|
||||
static uint32_t _i_ = 0;
|
||||
|
||||
#define TOCC(str, _count_)\
|
||||
_sum_ += (std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - _start_)).count();\
|
||||
|
Reference in New Issue
Block a user