Subject: Re: B20.1 clock() function bug?
From: [email-masked]

30 Jan 1999 08:52:59 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked], [email-masked]

In a message dated 1/30/99 1:28:38 AM Pacific Standard Time,
[email-masked] writes:

<<   The clock function,s era begins (with a value of 0) when the
   C program starts to execute.>>

I don't think you can count on that.  It should return a value of type
clock_t, which overflows and starts over periodically.

<<   It returns times measured in 1/CLOCKS_PER_SEC (which
   equals 1/1000 for Microsoft C).>>

Always use the local CLOCK_T.  Who knows when it might change or when you
might use a different brand of software.
 
<< Am I misinterpreting the behavior of clock()?  Does it return
 user time instead of absolute system time? >>

Read your C textbook.  That's what it should do, at least on NT.  On W95, this
is not possible, and maybe M$ has set up the NT version for compatibility with
W95.  BTW, the last time I checked clock() (prior to B20.1) it didn't work on
W95, so you have to use something based on QueryPerformance calls.  I'll look
into this.

 <<FWIW, I searched the mailing list archives and found no references to
 possible bugs in clock(). >>

I'm no archives expert, but I do recall discussing this, although the focus
was on the g77 version.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".