mirror of https://github.com/OpenTTD/OpenTTD
Cleanup: changing variable names in TIC() and TOC()
Removing double underscores to be ANSI-C standard compliant.pull/7235/head
parent
6c6971fb43
commit
4be2c1022e
14
src/debug.h
14
src/debug.h
|
@ -86,15 +86,15 @@ const char *GetDebugString();
|
||||||
**/
|
**/
|
||||||
#define TIC() {\
|
#define TIC() {\
|
||||||
uint64 _xxx_ = ottd_rdtsc();\
|
uint64 _xxx_ = ottd_rdtsc();\
|
||||||
static uint64 __sum__ = 0;\
|
static uint64 _sum_ = 0;\
|
||||||
static uint32 __i__ = 0;
|
static uint32 _i_ = 0;
|
||||||
|
|
||||||
#define TOC(str, count)\
|
#define TOC(str, count)\
|
||||||
__sum__ += ottd_rdtsc() - _xxx_;\
|
_sum_ += ottd_rdtsc() - _xxx_;\
|
||||||
if (++__i__ == count) {\
|
if (++_i_ == count) {\
|
||||||
DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " [avg: %.1f]", str, __sum__, __sum__/(double)__i__);\
|
DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " [avg: %.1f]", str, _sum_, _sum_/(double)_i_);\
|
||||||
__i__ = 0;\
|
_i_ = 0;\
|
||||||
__sum__ = 0;\
|
_sum_ = 0;\
|
||||||
}\
|
}\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue