mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Remove addition of 1ms to all timestamps
The +1 was a quick fix to avoid the division by zero, a more correct approach is to use 1ms as the minimum reported timestamp to avoid a division by zero. Later timestamps no longer include an additional 1ms. closes https://github.com/official-stockfish/Stockfish/pull/5778 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
675319b45d
commit
4c2241089d
@@ -2117,7 +2117,7 @@ void SearchManager::pv(Search::Worker& worker,
|
||||
if (!isExact)
|
||||
info.bound = bound;
|
||||
|
||||
TimePoint time = tm.elapsed_time() + 1;
|
||||
TimePoint time = std::max(TimePoint(1), tm.elapsed_time());
|
||||
info.timeMs = time;
|
||||
info.nodes = nodes;
|
||||
info.nps = nodes * 1000 / time;
|
||||
|
||||
Reference in New Issue
Block a user