summaryrefslogtreecommitdiffstats
path: root/src/Generating/NetherFortGen.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-18 14:35:33 +0200
committermadmaxoft <github@xoft.cz>2014-04-18 14:35:33 +0200
commit6d3bde52216020c59c7f1851d090bae1d1954f39 (patch)
tree94dff9fbbce5e3aaf4dbfbcf7f752366dc7346c4 /src/Generating/NetherFortGen.cpp
parentRemoved unsupported C++11 features. (diff)
downloadcuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.tar
cuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.tar.gz
cuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.tar.bz2
cuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.tar.lz
cuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.tar.xz
cuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.tar.zst
cuberite-6d3bde52216020c59c7f1851d090bae1d1954f39.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/NetherFortGen.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Generating/NetherFortGen.cpp b/src/Generating/NetherFortGen.cpp
index 7dc702e3a..d90fdeb0a 100644
--- a/src/Generating/NetherFortGen.cpp
+++ b/src/Generating/NetherFortGen.cpp
@@ -71,6 +71,40 @@ public:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Performance test of the NetherFort generator:
+
+/*
+#include "OSSupport/Timer.h"
+static class cNetherFortPerfTest
+{
+public:
+ cNetherFortPerfTest(void)
+ {
+ cTimer Timer;
+ long long StartTime = Timer.GetNowTime();
+
+ const int GridSize = 512;
+ const int MaxDepth = 12;
+ const int NumIterations = 100;
+ for (int i = 0; i < NumIterations; i++)
+ {
+ cNetherFortGen FortGen(i, GridSize, MaxDepth);
+ delete new cNetherFortGen::cNetherFort(FortGen, 0, 0, GridSize, MaxDepth, i);
+ }
+
+ long long EndTime = Timer.GetNowTime();
+ printf("%d forts took %lld msec (%f sec) to generate\n", NumIterations, EndTime - StartTime, ((double)(EndTime - StartTime)) / 1000);
+ exit(0);
+ }
+
+} g_PerfTest;
+//*/
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cNetherFortGen:
cNetherFortGen::cNetherFortGen(int a_Seed, int a_GridSize, int a_MaxDepth) :