aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorPeter Todd <pete@petertodd.org>2013-01-11 06:11:34 -0500
committerPeter Todd <pete@petertodd.org>2013-01-11 06:11:34 -0500
commit8686f6467c9db2606706baca33842c97ff7621f8 (patch)
treeab45e42d8fa8f0d4278a35e0d1030eadd9d80866 /src/util.cpp
parent429915bd0dfcdb03b13d9a3c2fb82d5401ef70ce (diff)
downloadbitcoin-8686f6467c9db2606706baca33842c97ff7621f8.tar.xz
Add timeoffset to getinfo RPC call
Provides a method to get the difference between network adjusted time and local time from the RPC interface.
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 576ba50dbb..f1ddda20f1 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -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)