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:
Marco Costalba
2012-03-31 10:01:31 +01:00
parent d033d5e06a
commit cc6c745b54
3 changed files with 5 additions and 3 deletions

View File

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