Dash Core  0.12.2.1
P2P Digital Currency
timedata.h File Reference
#include <algorithm>
#include <assert.h>
#include <stdint.h>
#include <vector>

Go to the source code of this file.

Classes

class  CMedianFilter< T >
 

Functions

int64_t GetTimeOffset ()
 
int64_t GetAdjustedTime ()
 
void AddTimeData (const CNetAddr &ip, int64_t nTime)
 

Function Documentation

◆ AddTimeData()

void AddTimeData ( const CNetAddr ip,
int64_t  nTime 
)

Definition at line 45 of file timedata.cpp.

Referenced by ProcessMessage().

◆ GetAdjustedTime()

int64_t GetAdjustedTime ( )

Definition at line 33 of file timedata.cpp.

Referenced by CAddrMan::Add_(), CGovernanceManager::AddGovernanceObject(), CGovernanceManager::AddOrphanVote(), CWallet::AddToWallet(), AppInit2(), CMasternode::Check(), CheckBlockHeader(), CheckFinalTx(), CPrivateSendServer::CheckForCompleteQueue(), CGovernanceManager::CheckMasternodeOrphanObjects(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), CGovernanceObject::CheckOrphanVotes(), CGovernanceManager::CheckOrphanVotes(), CGovernanceManager::CheckPostponedObjects(), CGovernanceTriggerManager::CleanAndRemove(), CGovernanceManager::CleanOrphanObjects(), CMasternode::CMasternode(), CMasternodePing::CMasternodePing(), CPrivateSendServer::CommitFinalTransaction(), CConnman::ConnectNode(), CreateNewBlock(), CPrivateSendServer::CreateNewSession(), TransactionDesc::FormatTxStatus(), GetLocalAddress(), CMasternodeMan::GetNextMasternodeInQueueForPayment(), gobject(), CMasternode::IsBroadcastedWithin(), CMasternodePing::IsExpired(), CDarksendQueue::IsExpired(), CAlert::IsInEffect(), CMasternode::IsPingedWithin(), CSporkManager::IsSporkActive(), CGovernanceVote::IsValid(), CGovernanceManager::MasternodeRateCheck(), movecmd(), CGovernanceManager::ProcessMessage(), ProcessMessage(), CGovernanceObject::ProcessVote(), CGovernanceManager::ProcessVote(), CAlert::RelayTo(), CActiveMasternode::SendMasternodePing(), SendMessages(), CMasternodePing::Sign(), CMasternodeBroadcast::Sign(), CMasternodePing::SimpleCheck(), CMasternodeBroadcast::SimpleCheck(), CConnman::ThreadOpenConnections(), ThreadSendAlert(), CGovernanceManager::UpdateCachesAndClean(), CGovernanceManager::UpdateCurrentWatchdog(), CActiveMasternode::UpdateSentinelPing(), CGovernanceObject::UpdateSentinelVariables(), CSporkManager::UpdateSpork(), TransactionRecord::updateStatus(), UpdateTime(), and CMasternode::UpdateWatchdogVoteTime().

◆ GetTimeOffset()

int64_t GetTimeOffset ( )

Functions to keep track of adjusted P2P time

"Never go to sea with two chronometers; take one or three." Our three time sources are:

  • System clock
  • Median of other nodes clocks
  • The user (asking the user to fix the system clock if the first two disagree)

Definition at line 27 of file timedata.cpp.

Referenced by GetAdjustedTime(), getinfo(), and getnetworkinfo().