From: <sv...@ww...> - 2004-10-09 11:32:58
|
Author: mkrose Date: 2004-10-09 04:32:48 -0700 (Sat, 09 Oct 2004) New Revision: 1285 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Timing.h Log: Fix Timer::reset() Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1285 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-05 07:17:34 UTC (rev 1284) +++ trunk/CSP/SimData/CHANGES.current 2004-10-09 11:32:48 UTC (rev 1285) @@ -1,19 +1,22 @@ Version 0.4.0 (in progress) =========================== -2004-04-04: onsight +2004-10-09: onsight + * Fix Timer::reset() + +2004-10-04: onsight * Add 32-bit and 64-bit pass-through hash functions. * Fix quat stream output method. -2004-04-03: onsight +2004-10-03: onsight * Added a generic most-recently-used cache class. Initial use will be for caching network message dispatch handlers in SimNet. * Added a unittest for the new cache class, and cleaned up the scons build script for the c++ unittests. -2004-04-03: delta +2004-10-03: delta * Updated vcproj. * Exported EnumerationCore from Enum.h. Modified: trunk/CSP/SimData/Include/SimData/Timing.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Timing.h 2004-10-05 07:17:34 UTC (rev 1284) +++ trunk/CSP/SimData/Include/SimData/Timing.h 2004-10-09 11:32:48 UTC (rev 1285) @@ -108,7 +108,12 @@ } /// Reset the elapsed time to zero (does not stop the timer). - inline void reset() { _elapsed = 0; } + inline void reset() { + if (_running) { + _start = get_realtime(); + } + _elapsed = 0; + } }; |