Farzad,

On 10/30/15 6:10 PM, Farzad Panahi wrote:
> Thanks for the explanation David.
> 
> I added System.nanoTime() to get high resolution numbers. Nano second
> numbers are telling me the same thing. When thread changes we see a
> difference of about 82ms (3082462134714 - 3082379268473 = 82866241).
> Within the same thread the time difference is something between 84 to
> 22 micros seconds (3082462218770  - 3082462134714 = 84056) ,
> (3082462241008  - 3082462218770  = 22238).
> 
> I think if it is a time resolution issue it should apply to all log
> lines. Why is it the case that only when thread is switching we see
> this huge hiccup? Thread context switch affects this but it cannot be
> in order of milli seconds.

What OS are you using? IIRC, the Windows timer has horrible resolution.
you can call System.currentTimeNanos all you want, but you won't get
anything meaningful lower than some threshold regardless of the actual
least significant digits coming back from those calls.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to