(svn r2601) Fix: Added TIC,TOC macros do be able to do profiling easier.

pull/155/head
ludde 19 years ago
parent f868fb0811
commit 9f4e400b86

@ -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 */ uint32 InteractiveRandom(void); /* Used for random sequences that are not the same on the other end of the multiplayer link */
uint InteractiveRandomRange(uint max); 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); void SetDate(uint date);
/* facedraw.c */ /* facedraw.c */
void DrawPlayerFace(uint32 face, int color, int x, int y); void DrawPlayerFace(uint32 face, int color, int x, int y);

@ -2038,7 +2038,7 @@ static int ParseCommandLine(char *line, char **argv, int max_argc)
#if defined(_MSC_VER) #if defined(_MSC_VER)
static uint64 _declspec(naked) rdtsc(void) uint32 _declspec(naked) rdtsc(void)
{ {
_asm { _asm {
rdtsc rdtsc

Loading…
Cancel
Save