5 #ifndef BITCOIN_TIMEDATA_H
6 #define BITCOIN_TIMEDATA_H
33 vValues.push_back(initial_value);
51 int vSortedSize =
vSorted.size();
52 assert(vSortedSize > 0);
55 return vSorted[vSortedSize / 2];
58 return (
vSorted[vSortedSize / 2 - 1] +
vSorted[vSortedSize / 2]) / 2;
78 #endif // BITCOIN_TIMEDATA_H
int64_t GetTimeOffset()
"Never go to sea with two chronometers; take one or three." Our three time sources are: ...
int64_t GetAdjustedTime()
void AddTimeData(const CNetAddr &ip, int64_t nOffsetSample)
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT