mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Reset search time as early as possible
In particualr before to wake up main thread that could take some random time. Until we don't reset search time we are not able to correctly track the elapsed search time and this can be dangerous under extreme time pressure. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -432,6 +432,8 @@ void ThreadsManager::start_searching(const Position& pos, const LimitsType& limi
|
||||
const std::set<Move>& searchMoves) {
|
||||
wait_for_search_finished();
|
||||
|
||||
SearchTime.restart(); // As early as possible
|
||||
|
||||
Signals.stopOnPonderhit = Signals.firstRootMove = false;
|
||||
Signals.stop = Signals.failedLowAtRoot = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user