Hi Antonio,

Antonio Gallardo wrote on Thursday, December 15, 2005 10:53 AM:
[snip] 
> 
> Jörg,
> 
> Can the StopWatch class in commons-lang help?
>
> http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/lang/
> trunk/src/java/org/apache/commons/lang/time/StopWatch.java?view=markup

Not really, since its implementation suffers also from such a time-shifting 
daemon.
 
> I am just thinking that this nice research is also useful for
> reviewing the StopWatch class too.

I am quite sure, that a unit test ensuring that StopWatch.getTime() never 
returns a negative number can be written so that it will fail in our Gump 
environment. But I doubt, that the StopWatch implementation can or should 
really do something about it.

I wonder which other classes may be affected by such time shifts also. I never 
really took that into account previously (although I was aware of the problem 
writing the time based id generator). Since it gets quite common that 
applications run in VMs (especially if a company uses the VMWare servers), the 
problem might arise more often in future ...

- Jörg

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

Reply via email to