MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetTime

Function GetTime

src/utiltime.cpp:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18static std::atomic<int64_t> nMockTime(0); //!< For unit testing
19
20int64_t GetTime()
21{
22 int64_t mocktime = nMockTime.load(std::memory_order_relaxed);
23 if (mocktime) return mocktime;
24
25 time_t now = time(nullptr);
26 assert(now > 0);
27 return now;
28}
29
30void SetMockTime(int64_t nMockTimeIn)
31{

Callers 15

RandAddSeedPerfmonFunction · 0.85
GetAdjustedTimeFunction · 0.85
removeForBlockMethod · 0.85
_clearMethod · 0.85
GetMinFeeMethod · 0.85
EXCLUSIVE_LOCKS_REQUIREDFunction · 0.85
InitializeNodeMethod · 0.85
LimitOrphanTxSizeFunction · 0.85
BlockConnectedMethod · 0.85
UpdatedBlockTipMethod · 0.85
RelayAddressFunction · 0.85
ProcessHeadersMessageFunction · 0.85

Calls

no outgoing calls

Tested by 8

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BasicTestingSetupMethod · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
mainFunction · 0.68