aboutsummaryrefslogtreecommitdiff
path: root/src/rpcnet.cpp
diff options
context:
space:
mode:
authorPavel Janík <Pavel@Janik.cz>2014-12-15 11:06:15 +0100
committerPavel Janík <Pavel@Janik.cz>2014-12-15 11:06:15 +0100
commit26a6bae7537c73cb4b713293ce29b7c6d71a542d (patch)
tree674b4fd2b88216a6cc56eb1933ee043a4ccdd2ea /src/rpcnet.cpp
parent13c077c7cfe9f367c721f3d99924b3d568afb4d0 (diff)
Add time offset to getpeerinfo output
Diffstat (limited to 'src/rpcnet.cpp')
-rw-r--r--src/rpcnet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 6ddbd62fca..e579856b1f 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -91,6 +91,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
" \"bytessent\": n, (numeric) The total bytes sent\n"
" \"bytesrecv\": n, (numeric) The total bytes received\n"
" \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n"
+ " \"timeoffset\": ttt, (numeric) The time offset in seconds\n"
" \"pingtime\": n, (numeric) ping time\n"
" \"pingwait\": n, (numeric) ping wait\n"
" \"version\": v, (numeric) The peer version, such as 7001\n"
@@ -131,6 +132,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
obj.push_back(Pair("bytessent", stats.nSendBytes));
obj.push_back(Pair("bytesrecv", stats.nRecvBytes));
obj.push_back(Pair("conntime", stats.nTimeConnected));
+ obj.push_back(Pair("timeoffset", stats.nTimeOffset));
obj.push_back(Pair("pingtime", stats.dPingTime));
if (stats.dPingWait > 0.0)
obj.push_back(Pair("pingwait", stats.dPingWait));