Author: Robert Hyatt
Date: 14:26:54 05/31/98
Go up one level in this thread
On May 31, 1998 at 13:28:23, Don Dailey wrote:
>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
I do the same thing as your gettimeofday(). The problem with clock()
is that older compilers used to use the time of day clock, since the
machine only ran one process at a time... Borland was one of those
that did this although I have no idea whether its been fixed or not...
It is a "dossy" problem...
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.