X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=0e7208755fbacc65e4fc4c916de552e23dacfa4e;hp=9dc103ed1992681b0fdef8252d3cc36cd73cb140;hb=55bd27b8f08a151128d7065fa2819aa3e9605299;hpb=3df2c01b5769c7ae996fb5b992c06e4a5428ad35 diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 9dc103ed..0e720875 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -66,7 +66,7 @@ void benchmark(const Position& current, istream& is) { vector fens; // Assign default values to missing arguments - string ttSize = (is >> token) ? token : "128"; + string ttSize = (is >> token) ? token : "32"; string threads = (is >> token) ? token : "1"; string limit = (is >> token) ? token : "12"; string fenFile = (is >> token) ? token : "default"; @@ -111,7 +111,7 @@ void benchmark(const Position& current, istream& is) { int64_t nodes = 0; Search::StateStackPtr st; - Time time = Time::current_time(); + Time::point elapsed = Time::now(); for (size_t i = 0; i < fens.size(); i++) { @@ -133,10 +133,10 @@ void benchmark(const Position& current, istream& is) { } } - int e = time.elapsed() + 1; // Assure positive to avoid a 'divide by zero' + elapsed = Time::now() - elapsed + 1; // Assure positive to avoid a 'divide by zero' cerr << "\n===========================" - << "\nTotal time (ms) : " << e + << "\nTotal time (ms) : " << elapsed << "\nNodes searched : " << nodes - << "\nNodes/second : " << 1000 * nodes / e << endl; + << "\nNodes/second : " << 1000 * nodes / elapsed << endl; }