Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.0-alpha
-
None
-
None
-
Reviewed
Description
When the system clock is set backwards, DataTransferThrottler will simply pause until the clock reaches the end of the previously calculated transfer period:
this.curPeriodStart = System.currentTimeMillis(); ... while (curReserve <= 0) { long now = System.currentTimeMillis(); long curPeriodEnd = curPeriodStart + period; if ( now < curPeriodEnd ) { try { wait( curPeriodEnd - now );
Instead of using currentTimeMillis() which is affected by system-clock-changes, this code should use nanoTime which ticks forward monotonically.