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.
This commit is contained in:
Michael Hendricks 2011-11-29 19:06:10 -07:00
parent 173efb1865
commit 5e1ddc4210
1 changed files with 6 additions and 3 deletions

View 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);
}
}