]> git.sesse.net Git - stockfish/commitdiff
Fix random moves when time < 10ms
authorMarco Costalba <mcostalba@gmail.com>
Tue, 10 Sep 2013 19:14:09 +0000 (21:14 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 10 Sep 2013 19:23:20 +0000 (21:23 +0200)
In case we have less then 10ms to think as soon as
we wake up the timer, it immediately fires and calls
check_time() where due to condition:

elapsed > TimeMgr.maximum_time() - 2 * TimerResolution

the stop flag is set and search returns immediately, without
actually search anything.

Here the somewhat hacky fix is to start the timer after
at least one iteration as been completed.

No functional change.


No differences found