mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-01 16:31:33 +01:00
Add timeoffset to getinfo RPC call
Provides a method to get the difference between network adjusted time and local time from the RPC interface.
This commit is contained in:
@@ -1203,9 +1203,14 @@ void SetMockTime(int64 nMockTimeIn)
|
||||
|
||||
static int64 nTimeOffset = 0;
|
||||
|
||||
int64 GetTimeOffset()
|
||||
{
|
||||
return nTimeOffset;
|
||||
}
|
||||
|
||||
int64 GetAdjustedTime()
|
||||
{
|
||||
return GetTime() + nTimeOffset;
|
||||
return GetTime() + GetTimeOffset();
|
||||
}
|
||||
|
||||
void AddTimeData(const CNetAddr& ip, int64 nTime)
|
||||
|
||||
Reference in New Issue
Block a user