www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Stopping a StopWatch that's not started

reply "ixid" <nuaccount gmail.com> writes:
This may not qualify as a bug though it's not helpful. If you 
stop a StopWatch from std.datetime that's not been started it 
gets set to a garbage time value rather than remaining at 0. This 
seems like inconsistent behaviour as stopping a started stopwatch 
retains the time value that it had when it was stopped. A linked 
enhancement request would be that it would be nice to have a 
dedicated 'isStarted' boolean member function to check if a 
StopWatch is running or not rather than checking that time has 
passed.
Jul 12 2012
parent reply "David Nadlinger" <see klickverbot.at> writes:
On Thursday, 12 July 2012 at 19:52:13 UTC, ixid wrote:
 This may not qualify as a bug though it's not helpful. If you 
 stop a StopWatch from std.datetime that's not been started it 
 gets set to a garbage time value rather than remaining at 0. 
 This seems like inconsistent behaviour as stopping a started 
 stopwatch retains the time value that it had when it was 
 stopped. A linked enhancement request would be that it would be 
 nice to have a dedicated 'isStarted' boolean member function to 
 check if a StopWatch is running or not rather than checking 
 that time has passed.
This group is strictly meant for providing a feed of bug tracker activity, and is generally not monitored (posting should really be restricted). Please file any bug reports or enhancement requests directly to the Bugzilla instance at http://d.puremagic.com/issues/. David
Jul 12 2012
parent "ixid" <nuaccount gmail.com> writes:
Ah, sorry. Wasn't aware of that.
Jul 12 2012