Realtime equivalent to Java's Thread.sleep()?
In our case, we had a simple Thread.sleep(1000), and during that one second period another thread set the clock back two minutes. The sleeping thread ended up sleeping roughly two minutes and a second instead of just a second. Apparently this is a "feature" of Thread.sleep(), and I can see in some cases (e.g. a task scheduler based on wall clock times) where this is exactly the behavior you'd want. However, in our case, we want the sleep function to sleep by the amount we specify, regardless of changes to the wall clock time. Is there a way to do this in Java?
sleep function should use nanosleep already actually. If it does and the timewarp
stufff still happens then it's a FreeBSD bug.
#If you have any other info about this subject , Please add it free.# |





