diff src/util.cpp @ 1544:5fba80d924d9 draft

Only log time samples in debug mode 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.
author Michael Hendricks <michael@ndrix.org>
date Tue, 29 Nov 2011 19:06:10 -0700 (2011-11-30)
parents 97bac6569f62
children 6158c8936f47
line wrap: on
line diff
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -977,9 +977,12 @@
                 }
             }
         }
-        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);
     }
 }