jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: timestamps out of sync with system clock
Date Fri, 19 Nov 2010 10:35:50 GMT
On 19 November 2010 04:03, Andrej van der Zee <> wrote:
> Hi,
>> I would prefer an option that gets the time ether from
>> currentTimeMillis() or from nanoTime(). On windows, the latter gets
>> its value from the QueryPerformanceCounter() API which causes the
>> drift from the system-clock.
> On few particular machines we have seen a drift that is very extreme
> and it showed that nanoTime() did not give correct elapsed times too.
> Therefor in our case, we strongly prefer an option that switches of
> nanoTime() completely and use currentTimeMillis() instead, for
> timestamps and also for elapsed time calculation. Such an option would
> be very much appreciated. Also, we rely on the system-clock for
> comparison with other tools such as tcpdump, therefore we really need
> an implementation based on currentTimeMillis() only.

Nanotime was added to try and provide additional resolution - looks
like it causes more problems than it solves...

I think the options are:

currentTimeMillis only
Use cTM for start (or end) timestamp, and use differential nanoTime for elapsed.

The second option is as at present, but without storing the fixed base time.
There cannot then be any accumulation of drift.

> Best regards,
> Andrej
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message