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 |
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.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3575.1 | "for history reasons" is the best we can do | HNDYMN::MCCARTHY | A Quinn Martin Production | Fri May 16 1997 10:49 | 8 |
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.2 | stopclock | NNTPD::"[email protected]" | Paul Doyle | Thu May 22 1997 08:03 | 9 |
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] |