Author: ljn1981
Date: 2006-09-10 18:00:40 +0000 (Sun, 10 Sep 2006)
New Revision: 10449

Modified:
   trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
Log:
Small optimization.


Modified: trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-09-10 17:19:42 UTC (rev 10448)
+++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-09-10 18:00:40 UTC (rev 10449)
@@ -139,15 +139,17 @@
                if(peerNodeStatuses.length>0){

                        /* node status values */
+                       long nodeUptimeSeconds = ( now - node.startupTime ) / 
1000;
                        int bwlimitDelayTime = (int) node.getBwlimitDelayTime();
                        int nodeAveragePingTime = (int) 
node.getNodeAveragePingTime();
                        int networkSizeEstimateSession = 
node.getNetworkSizeEstimate(-1);
-                       int networkSizeEstimateRecent = 
node.getNetworkSizeEstimate(now - (48*60*60*1000));  // 48 hours
+                       if(nodeUptimeSeconds > (48*60*60)) {  // 48 hours
+                               int networkSizeEstimateRecent = 
node.getNetworkSizeEstimate(now - (48*60*60*1000));  // 48 hours
+                       }
                        DecimalFormat fix4 = new DecimalFormat("0.0000");
                        double missRoutingDistance =  
node.missRoutingDistance.currentValue();
                        DecimalFormat fix1 = new DecimalFormat("##0.0%");
                        double backedoffPercent =  
node.backedoffPercent.currentValue();
-                       long nodeUptimeSeconds = ( now - node.startupTime ) / 
1000;
                        String nodeUptimeString = 
timeIntervalToString(nodeUptimeSeconds);

                        // BEGIN OVERVIEW TABLE


Reply via email to