From 9f4e400b862b93f770e9f51a405c9686f42a566f Mon Sep 17 00:00:00 2001 From: ludde Date: Sun, 17 Jul 2005 12:49:00 +0000 Subject: (svn r2601) Fix: Added TIC,TOC macros do be able to do profiling easier. --- functions.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'functions.h') diff --git a/functions.h b/functions.h index 2387fa19d..74d6980f4 100644 --- a/functions.h +++ b/functions.h @@ -126,6 +126,12 @@ static inline TileIndex RandomTile(void) { return TILE_MASK(Random()); } uint32 InteractiveRandom(void); /* Used for random sequences that are not the same on the other end of the multiplayer link */ uint InteractiveRandomRange(uint max); + +// Used for profiling +#define TIC() { extern uint32 rdtsc(void); uint32 _xxx_ = rdtsc(); +#define TOC(s) _xxx_ = rdtsc() - _xxx_; printf("%s: %d\n", s, _xxx_); } + + void SetDate(uint date); /* facedraw.c */ void DrawPlayerFace(uint32 face, int color, int x, int y); -- cgit v1.2.3-54-g00ecf