Author: Robert Hyatt
Date: 03:08:01 07/24/98
Go up one level in this thread
On July 24, 1998 at 00:41:13, Inmann Werner wrote: >Hello > >At midnight the clock of my program gets corrupted. I think there was some >messages some times ago here in CCC, but I do not find them. >Has anybody found something out about it? (Strange thing) > >Werner this is a common bug that has sunk more than one chess program in the ACM events. What happens is that you grab the time at the start of the move, then periodically you grab the current time, subtract the start time from it, and check to see if you have used the time you wanted. If your computer happens to report time in a 24-hour format only, at midnight the time wraps around to zero, and you conclude that you have a day to search. Unix reports the time differently so that we don't get burned like this, but lots of machines (DOS, and even some non-PC systems) don't. The solution is to simply check for the current time being less than the start time, and if so, adding 24 hours to the current time. I had to do this in Cray Blitz, for example, before Cray went to a unix system.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.