Author: toad
Date: 2008-04-11 17:55:25 +0000 (Fri, 11 Apr 2008)
New Revision: 19193
Modified:
trunk/freenet/src/freenet/node/UptimeEstimator.java
Log:
Don't wait until the next time period.
Modified: trunk/freenet/src/freenet/node/UptimeEstimator.java
===================================================================
--- trunk/freenet/src/freenet/node/UptimeEstimator.java 2008-04-11 17:50:01 UTC
(rev 19192)
+++ trunk/freenet/src/freenet/node/UptimeEstimator.java 2008-04-11 17:55:25 UTC
(rev 19193)
@@ -120,7 +120,8 @@
}
private void schedule(long now) {
- long nextTime = (((now / 5*60*1000) + 1) * (5*60*1000)) +
timeOffset;
+ long nextTime = (((now / 5*60*1000)) * (5*60*1000)) +
timeOffset;
+ if(nextTime < now) nextTime += 5*60*1000;
ticker.queueTimedJob(this, System.currentTimeMillis() -
nextTime);
}