Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Time functions:

Author: Christophe Theron

Date: 11:44:33 09/25/99

Go up one level in this thread


On September 25, 1999 at 02:21:37, Dan Newman wrote:

(snip)

>I haven't tried this in Linux, but the best I've ever gotten on a PC
>(Windows/DOS) is about a 55ms resolution.  I think this is due to the
>fact that the interrupt that maintains the time goes off 18.2 times/s (IIRC).

That's perfectly correct.

This number (18.2/s) sounds strange, but it's because the designers of the
original PC wanted to have 65536 clock ticks per hour.

That makes 65536 / 3600 = 18.204444... ticks per second. Or a 54932 uSec period.



>Unfortunately, no Windows/DOS compiler that I've used has the gettimeofday()
>function (unless GNU does--I haven't looked there).  They do tend to have a
>rather large number of time functions to choose from though.

Yes, the GNU C Compiler for DOS has the gettimeofday funtion. I have just seen
it in the online help, but I have not tried it.



    Christophe

(snip)



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.