H.G.Muller wrote:Well, WinBoard send the time the engine still has on its clock before every move it sends. (The time command.) If your engine would pay attention to that, the problem you sketch should not occur.
The engine should also be able to see it himself, for the move it is working on when it gets suspended. Just be sure that to ask the system how long italready has been thinking it asks for the wall-clock time (e.g. GetTickCount), and not for CPU time.
Duh.
That was my bad.
My engine does use GetTickCount() and it
does respond respond to the time and otim commands by setting the appropriate time control.
To provide context, only once where the computer did not go to sleep did I have a problem with the time control; every other time the computer did not go to sleep, and this is probably dozens of times, the engine worked fine with WinBoard. It's just those random pieces.
Perhaps, I should better organize my time control class, and use a more object-oriented techinque for keeping track of the time to minimize errors and to better handle overflow of GetTickCount() (i.e. when it wraps back around)? My time controls already handle it, but the style I used was to rewrite the code over and over again.
I shall do that and return.
Thanks.