From 80654b27323c5eb29a755b77f4100f0952f36e62 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 17 Mar 2010 17:00:35 +0000
Subject: [PATCH] Discard at IBGW based on router clock not system clock

---
 router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java
index 2644cf3306..7dfbded7d8 100644
--- a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java
+++ b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java
@@ -386,7 +386,7 @@ public class TunnelDispatcher implements Service {
      *
      */
     public void dispatch(TunnelGatewayMessage msg) {
-        long before = System.currentTimeMillis();
+        long before = _context.clock().now();
         TunnelGateway gw = _inboundGateways.get(msg.getTunnelId());
         if (gw != null) {
             if (_log.shouldLog(Log.DEBUG))
@@ -423,7 +423,7 @@ public class TunnelDispatcher implements Service {
                            + " existing = " + _inboundGateways.size(), new Exception("source"));
         }
         
-        long dispatchTime = System.currentTimeMillis() - before;
+        long dispatchTime = _context.clock().now() - before;
         
         if (_log.shouldLog(Log.DEBUG))
             _log.debug("Dispatch in gw time: " + dispatchTime + " gateway? " + gw);
-- 
GitLab