Computer Chess Club Archives


Search

Terms

Messages

Subject: Dabbabas clock has a ghost at midnight!

Author: Jens Baek Nielsen

Date: 09:13:28 05/31/98



My chessprogram Dabbaba uses this code to get the time:

double get_the_time()
// returns the number of 1/100 seconds since the program started
{return (double)(100*(clock())/CLK_TCK);}

It works fine except at midnight, where strange numbers suddenly appears
- suddenly white has used more than 8 million seconds etc.!

Is it only me who has encountered this problem?
Is there a better way to measure the time?

I consider to estimate the time from the number of nodes searched at
this midnightevent, but it is rather silly code to have in your program.

I use a Borland Turbo C++ 3.0 compiler.

Greetings Jens



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.