X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=9f0ac0c145b220798eaab1449e8b848f3c411b94;hp=ba05ac7fb8af7561bfd425e8dc1f4cdcfe738f16;hb=3aa471f2a9cb;hpb=103b368ab7f5fd696e0c6925917344d15a3c2d9c diff --git a/src/benchmark.cpp b/src/benchmark.cpp index ba05ac7f..9f0ac0c1 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++) { @@ -120,15 +118,15 @@ void benchmark(int argc, char* argv[]) { } else { - Threads.start_thinking(pos, limits); + Threads.start_searching(pos, limits); nodes += Search::RootPosition.nodes_searched(); } } - 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; }