I think it makes sense to be able to stop from suspend. That would give the
caller the most options. Otherwise, if the stopwatch were suspended, you'd
have to restart it before stopping, which would change the time of the
stopwatch. Being able to stop while suspended means you can stop from
suspend without the time changing, but a caller could still resume and then
stop if they wanted that functionality.

For reset when state is running or split, I think that should not be
allowed. I think the stopwatch can only be reset if the stopwatch is
stopped. That keeps the methods cleaner while still providing the necessary
functionality.

Steven Caswell
Sun Certified Java Programmer
[EMAIL PROTECTED]
"War is an ugly thing, but not the ugliest of things. The decayed and
degraded state of moral and patriotic feeling that thinks that nothing is
worth war is much worse. The person who has nothing for which he is willing
to fight, nothing which is more important than his own personal safety, is a
miserable creature and has no chance of being free unless made and kept so
by the exertions of better men than himself." .... John Stuart Mill.


> -----Original Message-----
> From: Henri Yandell [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, July 18, 2004 6:43 PM
> To: 'Jakarta Commons Developers List'
> Subject: [lang] Stopwatch improvements
> 
> 
> 
> I've put in the suggested state for the Stopwatch class into 
> the Bugzilla
> issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=29163
> 
> One major issue is that it changes the functionality of 
> Stopwatch quite a lot, so I suspect that it should be held 
> back for 3.0.
> 
> Opinions very welcome, on both the state suggestion and 
> whether it should be held for 3.0.
> 
> Hen
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to