X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;h=b9a802ad3c3bdb4ccb2afe2abf06f2841f41fd8c;hp=28eff708852e024e7805ab86677cab05dcf3659d;hb=8f5deaea61e8aa754b324b809cc8f7f394dc7e0f;hpb=a16ba5bbd1034417f864476e4ba33d35970557db diff --git a/src/misc.cpp b/src/misc.cpp index 28eff708..b9a802ad 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -59,20 +59,13 @@ const string engine_info(bool to_uci) { } -/// Convert system time to milliseconds. That's all we need. - -Time::point Time::now() { - sys_time_t t; system_time(&t); return time_to_msec(t); -} - - /// Debug functions used mainly to collect run-time statistics static uint64_t hits[2], means[2]; -void dbg_hit_on(bool b) { hits[0]++; if (b) hits[1]++; } +void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; } void dbg_hit_on_c(bool c, bool b) { if (c) dbg_hit_on(b); } -void dbg_mean_of(int v) { means[0]++; means[1] += v; } +void dbg_mean_of(int v) { ++means[0]; means[1] += v; } void dbg_print() { @@ -82,7 +75,7 @@ void dbg_print() { if (means[0]) cerr << "Total " << means[0] << " Mean " - << (float)means[1] / means[0] << endl; + << (double)means[1] / means[0] << endl; }