diff options
| author | Michael Hendricks <[email protected]> | 2011-11-29 19:06:10 -0700 |
|---|---|---|
| committer | Michael Hendricks <[email protected]> | 2011-12-01 17:28:14 -0700 |
| commit | 5e1ddc421060e24bdcda75a863d9a5e03e633423 (patch) | |
| tree | 6f838f9552b24ff8ce721aa6121af35e8b0add9c /src/util.cpp | |
| parent | Merge pull request #670 from gavinandresen/rpcauth_speedup (diff) | |
| download | discoin-5e1ddc421060e24bdcda75a863d9a5e03e633423.tar.xz discoin-5e1ddc421060e24bdcda75a863d9a5e03e633423.zip | |
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.
Diffstat (limited to 'src/util.cpp')
| -rw-r--r-- | src/util.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp index 236c7f7c4..badf43c0d 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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); } } |