Only log time samples in debug mode
authorMichael Hendricks <michael@ndrix.org>
Wed, 30 Nov 2011 02:06:10 +0000 (19:06 -0700)
committerMichael Hendricks <michael@ndrix.org>
Fri, 2 Dec 2011 00:28:14 +0000 (17:28 -0700)
The full list of time samples is rarely useful outside of debugging.
The node's time offset, however is useful for discovering local clock
drift, so it's displayed in all logging modes.

src/util.cpp

index 236c7f7..badf43c 100644 (file)
@@ -977,9 +977,12 @@ void AddTimeData(unsigned int ip, int64 nTime)
                 }
             }
         }
-        BOOST_FOREACH(int64 n, vTimeOffsets)
-            printf("%+"PRI64d"  ", n);
-        printf("|  nTimeOffset = %+"PRI64d"  (%+"PRI64d" minutes)\n", nTimeOffset, nTimeOffset/60);
+        if (fDebug) {
+            BOOST_FOREACH(int64 n, vTimeOffsets)
+                printf("%+"PRI64d"  ", n);
+            printf("|  ");
+        }
+        printf("nTimeOffset = %+"PRI64d"  (%+"PRI64d" minutes)\n", nTimeOffset, nTimeOffset/60);
     }
 }