Bitcoin ABC 0.30.7
P2P Digital Currency
|
#include <timedata.h>
#include <common/args.h>
#include <logging.h>
#include <netaddress.h>
#include <node/ui_interface.h>
#include <sync.h>
#include <util/translation.h>
#include <warnings.h>
Go to the source code of this file.
Macros | |
#define | BITCOIN_TIMEDATA_MAX_SAMPLES 200 |
Functions | |
static int64_t nTimeOffset | GUARDED_BY (g_timeoffset_mutex)=0 |
int64_t | GetTimeOffset () |
"Never go to sea with two chronometers; take one or three." Our three time sources are: More... | |
NodeClock::time_point | GetAdjustedTime () |
void | AddTimeData (const CNetAddr &ip, int64_t nOffsetSample) |
void | TestOnlyResetTimeData () |
Reset the internal state of GetTimeOffset(), GetAdjustedTime() and AddTimeData(). More... | |
Variables | |
static GlobalMutex | g_timeoffset_mutex |
static std::set< CNetAddr > | g_sources |
static CMedianFilter< int64_t > | g_time_offsets (BITCOIN_TIMEDATA_MAX_SAMPLES, 0) |
static bool | g_warning_emitted |
#define BITCOIN_TIMEDATA_MAX_SAMPLES 200 |
Definition at line 39 of file timedata.cpp.
void AddTimeData | ( | const CNetAddr & | ip, |
int64_t | nOffsetSample | ||
) |
NodeClock::time_point GetAdjustedTime | ( | ) |
Definition at line 35 of file timedata.cpp.
int64_t GetTimeOffset | ( | ) |
"Never go to sea with two chronometers; take one or three." Our three time sources are:
Functions to keep track of adjusted P2P time.
Definition at line 30 of file timedata.cpp.
|
staticpure virtual |
void TestOnlyResetTimeData | ( | ) |
Reset the internal state of GetTimeOffset(), GetAdjustedTime() and AddTimeData().
Definition at line 127 of file timedata.cpp.
|
static |
Definition at line 41 of file timedata.cpp.
|
static |
|
static |
Definition at line 19 of file timedata.cpp.
|
static |
Definition at line 43 of file timedata.cpp.