[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3575.0. "Stopwatch::real() rounding?" by NNTPD::"pdoyle@anorax.ilo.dec.com" (Paul Doyle) Fri May 16 1997 13:09

Why does double Stopwatch::real() always return a whole integer value? 
Stopwatch::system() and Stopwatch::user() return fractional second values, 
as expected.

DEC C++ V5.5-004 on Digital UNIX (Alpha)
OSF1 V3.2 148 alpha

Thanks,

Paul

[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
3575.1"for history reasons" is the best we can doHNDYMN::MCCARTHYA Quinn Martin ProductionFri May 16 1997 13:498
I wish I could give a good reason but I can't.  

I went back and read the AT&T description (from which our stopwatch evolved)
and it doesn't even go into details of the return values, except to 
say "returned in units of seconds".  Real is "wall clock" time and it could
be that most wall clocks don't have fractional seconds listed.

bjm
3575.2stopclockNNTPD::"pdoyle@anorax.ilo.dec.com"Paul DoyleThu May 22 1997 11:039
For anyone who may be interested, I have written a stopclock class that 
does most of what Stopclock does, but with fractional real time (accurate 
to the clock tick interval, 1/60 sec in my case).

I can post a copy here (approx. 200 lines) if anyone wants.

Paul

[Posted by WWW Notes gateway]