Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Calculating CPU usage

Author: Robert Hyatt

Date: 17:58:35 01/29/00

Go up one level in this thread


On January 29, 2000 at 01:35:14, James Robertson wrote:

>I'm trying to make my program spit out the percentage of cpu time it got after
>every move. What is the best way to do this, in Windows, Linux, and DOS?
>
>Thanks,
>James

Look at crafty source.  I have a function ReadClock() in utility.c that
takes a single argument, asking for CPU time or elapsed time.  It works
on all platforms I know of...


call it once asking for cpu time, once for elapsed time, then divide.

:)



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.