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:
Disservin
2025-01-14 08:34:37 +01:00
committed by Joost VandeVondele
parent 675319b45d
commit 4c2241089d

View File

@@ -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;