train_cmd.c
changeset 2482 dffcca243dbc
parent 2477 d454d5152386
child 2484 8e0c88a833fb
--- a/train_cmd.c	Sun Oct 02 12:31:00 2005 +0000
+++ b/train_cmd.c	Sun Oct 02 22:39:56 2005 +0000
@@ -1943,7 +1943,7 @@
 static const byte _pick_track_table[6] = {1, 3, 2, 2, 0, 0};
 #if PF_BENCHMARK
 #if !defined(_MSC_VER)
-unsigned int rdtsc()
+unsigned int _rdtsc()
 {
      unsigned int high, low;
 
@@ -1951,7 +1951,8 @@
      return low;
 }
 #else
-static unsigned int _declspec(naked) rdtsc(void)
+#ifndef _M_AMD64
+static unsigned int _declspec(naked) _rdtsc(void)
 {
 	_asm {
 		rdtsc
@@ -1960,6 +1961,7 @@
 }
 #endif
 #endif
+#endif
 
 
 
@@ -1969,7 +1971,7 @@
 	TrainTrackFollowerData fd;
 	uint best_track;
 #if PF_BENCHMARK
-	int time = rdtsc();
+	int time = _rdtsc();
 	static float f;
 #endif
 
@@ -2040,7 +2042,7 @@
 	}
 
 #if PF_BENCHMARK
-	time = rdtsc() - time;
+	time = _rdtsc() - time;
 	f = f * 0.99 + 0.01 * time;
 	printf("PF time = %d %f\n", time, f);
 #endif