5 #ifndef BITCOIN_TIMEDATA_H
6 #define BITCOIN_TIMEDATA_H
30 vValues.push_back(initial_value);
46 int vSortedSize =
vSorted.size();
48 if (vSortedSize & 1) {
50 return vSorted[vSortedSize / 2];
53 auto left =
vSorted[vSortedSize / 2 - 1];
54 auto right =
vSorted[vSortedSize / 2];
55 return left / 2 + right / 2 + (left & right & 1);
int64_t GetAdjustedTime()
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT
int64_t GetTimeOffset()
Functions to keep track of adjusted P2P time.
void AddTimeData(const CNetAddr &ip, int64_t nTime)