Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: CPU clock speed determination? - complete this time...

Author: Ed Trice

Date: 16:20:41 01/14/04

Go up one level in this thread



>	timeStart = timeStop;
>
>	for( ; ; )
>	 { timeStop = clock();
>	   if ( (timeStop-timeStart) > 1000 )	// one second
>	    {

Just for the sake of completeness, you should use the CLK_TCK macro to get the
number of cycles per second. On the Macintosh there are only 60 ticks per second
unless you use their proprietary ROM calls to get down to the millisecond and
microsecond.

so...

if ( (timeStop-timeStart) > CLK_TCK )



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.