]> git.sesse.net Git - stockfish/commitdiff
Print time and node count before search ends
authorMarco Costalba <mcostalba@gmail.com>
Fri, 3 May 2013 08:25:25 +0000 (10:25 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 3 May 2013 08:26:03 +0000 (10:26 +0200)
This info is normally printed together with
PV info in uci_pv() but when search is stopped,
for instance when max search time is reached,
uci_pv is not called and we miss this bits.

Suggested by gravy_train

No functional change.

src/search.cpp

index dfd2d3ba05bbcf580f7c521afabedf253ba15e2f..f303b57684cc545be1a3e83cb3355a1008c4bb10 100644 (file)
@@ -264,6 +264,10 @@ void Search::think() {
 
 finalize:
 
+  // When search is stopped this info is not printed
+  sync_cout << "info nodes " << RootPos.nodes_searched()
+            << " time " << Time::now() - SearchTime + 1 << sync_endl;
+
   // When we reach max depth we arrive here even without Signals.stop is raised,
   // but if we are pondering or in infinite search, according to UCI protocol,
   // we shouldn't print the best move before the GUI sends a "stop" or "ponderhit"