Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Dabbabas clock has a ghost at midnight!

Author: Don Dailey

Date: 10:28:23 05/31/98

Go up one level in this thread


On May 31, 1998 at 13:17:08, Don Dailey wrote:

>This routine works on a unix system.  It may also work on other
>OS's.
>
>typedef  unsigned long long u64;
>
>/* return an absolute wall time counter in milliseconds  */
>static u64 wall_time()
>{
>  struct timeval t;
>  struct timezone tz;
>  u64 result;
>
>  gettimeofday(&t,&tz);
>
>  result = 1000 * (u64) t.tv_sec;
>  result += ((u64) t.tv_usec)/1000;
>
>  return(result);
>}



P.S.  Also, you could look at Crafty's code to see what Bob
does for getting time.

- Don



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.