From 2a2587b13d26951f65b479144b0a31d9dd31e24c Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 29 Apr 2015 02:41:25 +0000
Subject: [PATCH] fix logic bug

---
 router/java/src/net/i2p/router/RouterClock.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/router/java/src/net/i2p/router/RouterClock.java b/router/java/src/net/i2p/router/RouterClock.java
index f70bd31cdc..a1c51e0e68 100644
--- a/router/java/src/net/i2p/router/RouterClock.java
+++ b/router/java/src/net/i2p/router/RouterClock.java
@@ -176,7 +176,7 @@ public class RouterClock extends Clock {
         // a previous step adjustment.
         // This allows NTP to trump a peer offset after a soft restart
         if (_alreadyChanged &&
-            (stratum >= _lastStratum || _startedOn - System.currentTimeMillis() > 60*1000)) {
+            (stratum >= _lastStratum || System.currentTimeMillis() - _startedOn > 60*1000)) {
             // Update the target offset, slewing will take care of the rest
             if (delta > 15*1000)
                 getLog().logAlways(Log.WARN, "Warning - Updating target clock offset to " + offsetMs + "ms from " + _offset + "ms, Stratum " + stratum);
-- 
GitLab