]> git.sesse.net Git - stockfish/commit
Set timer to a fixed interval
authorMarco Costalba <mcostalba@gmail.com>
Fri, 1 Nov 2013 07:53:29 +0000 (08:53 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 1 Nov 2013 07:56:15 +0000 (08:56 +0100)
commita3a0df92a3ed5ce7c98ff596e687d3d6533590c8
treeb806ee21c0160d313e85a05046de3eeb3477050e
parente8f9447b11efd80a01733175c5076db988c45aa9
Set timer to a fixed interval

And remove a complex (and broken) formula.

Indeed previous code was broken in case of TC with big
time increments where available_time() was too similar
to total time yielding to many time losses, so for instance:

go wtime 2600 winc 2600
info nodes 4432770 time 2601 <-- time forfeit!

maximum search time = 2530 ms
available_time = 2300 ms

For a reference and further details see:

https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/dCPAvQDcm2E

Speed tested with bench disabling timer alltogheter vs timer set at
max resolution, showed we have no speed regressions both in single
core and when using all physical cores.

No functional change.
src/search.cpp
src/thread.cpp
src/thread.h