mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r3303) Change #if PF_BENCHMARK to #ifdef PF_BENCHMARK
This commit is contained in:
parent
ec274769b9
commit
f6330faead
@ -2159,7 +2159,7 @@ static const byte _search_directions[6][4] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const byte _pick_track_table[6] = {1, 3, 2, 2, 0, 0};
|
static const byte _pick_track_table[6] = {1, 3, 2, 2, 0, 0};
|
||||||
#if PF_BENCHMARK
|
#ifdef PF_BENCHMARK
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
unsigned int _rdtsc()
|
unsigned int _rdtsc()
|
||||||
{
|
{
|
||||||
@ -2188,7 +2188,7 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
|
|||||||
{
|
{
|
||||||
TrainTrackFollowerData fd;
|
TrainTrackFollowerData fd;
|
||||||
uint best_track;
|
uint best_track;
|
||||||
#if PF_BENCHMARK
|
#ifdef PF_BENCHMARK
|
||||||
int time = _rdtsc();
|
int time = _rdtsc();
|
||||||
static float f;
|
static float f;
|
||||||
#endif
|
#endif
|
||||||
@ -2259,7 +2259,7 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PF_BENCHMARK
|
#ifdef PF_BENCHMARK
|
||||||
time = _rdtsc() - time;
|
time = _rdtsc() - time;
|
||||||
f = f * 0.99 + 0.01 * time;
|
f = f * 0.99 + 0.01 * time;
|
||||||
printf("PF time = %d %f\n", time, f);
|
printf("PF time = %d %f\n", time, f);
|
||||||
|
Loading…
Reference in New Issue
Block a user