aboutsummaryrefslogtreecommitdiff
path: root/src/rpcnet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-01-02 17:47:08 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-01-02 17:54:21 +0100
commitc986972ad77242664c41c5e6fe07214e84aadd82 (patch)
treeade772431c84c3e839b5cb03161d57505d4c2766 /src/rpcnet.cpp
parent40d65eb66d0865aa64c410c3eb970dafcad71851 (diff)
parent73caf47dfe9c398aac75b5f6bcd1e0a644479a46 (diff)
Merge pull request #5476
73caf47 Display time offset in the debug window's Peers tab (Pavel Janík) 26a6bae Add time offset to getpeerinfo output (Pavel Janík)
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 2886f7adab..f0fadb5987 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));