X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=4124899b33d4fd7a1b84a36a3eb1490b29509166;hp=ba05ac7fb8af7561bfd425e8dc1f4cdcfe738f16;hb=553655eb073cdd59c726dd77fcf368d499029467;hpb=103b368ab7f5fd696e0c6925917344d15a3c2d9c diff --git a/src/benchmark.cpp b/src/benchmark.cpp index ba05ac7f..4124899b 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -61,7 +61,6 @@ void benchmark(int argc, char* argv[]) { vector fens; Search::LimitsType limits; - int time; int64_t nodes = 0; // Assign default values to missing arguments @@ -73,7 +72,6 @@ void benchmark(int argc, char* argv[]) { Options["Hash"] = ttSize; Options["Threads"] = threads; - Options["OwnBook"] = false; if (valType == "time") limits.maxTime = 1000 * atoi(valStr.c_str()); // maxTime is in ms @@ -104,7 +102,7 @@ void benchmark(int argc, char* argv[]) { else fens.assign(Defaults, Defaults + 16); - time = system_time(); + Time time = Time::current_time(); for (size_t i = 0; i < fens.size(); i++) { @@ -125,10 +123,10 @@ void benchmark(int argc, char* argv[]) { } } - time = system_time() - time; + int e = time.elapsed(); cerr << "\n===========================" - << "\nTotal time (ms) : " << time + << "\nTotal time (ms) : " << e << "\nNodes searched : " << nodes - << "\nNodes/second : " << int(nodes / (time / 1000.0)) << endl; + << "\nNodes/second : " << int(nodes / (e / 1000.0)) << endl; }