[concurrency-interest] Latency in starting threads
jeffhain at rocketmail.com
Tue Apr 16 16:16:14 EDT 2013
>long time = System.currentTimeMillis();
System.currentTimeMillis() might jump around
with system time (but I don't mean it's where
the 250s come from).
You could use use System.nanoTime() instead
when measuring delays (as done in j.u.c):
Drift, if any, should be slow (ok for small benches),
and if it jumps (might happen on some broken configurations)
it should more likely create either obviously crazy or tiny
At least I never experienced timing glitches with it
as I did with System.currentTimeMillis().
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest