[net processing] Use std::chrono for type-safe time offsets

This commit is contained in:
stickies-v
2024-02-03 17:15:41 +00:00
parent 038fd979ef
commit 55361a15d1
4 changed files with 9 additions and 6 deletions

View File

@@ -239,7 +239,7 @@ static RPCHelpMan getpeerinfo()
obj.pushKV("bytessent", stats.nSendBytes);
obj.pushKV("bytesrecv", stats.nRecvBytes);
obj.pushKV("conntime", count_seconds(stats.m_connected));
obj.pushKV("timeoffset", statestats.time_offset);
obj.pushKV("timeoffset", Ticks<std::chrono::seconds>(statestats.time_offset));
if (stats.m_last_ping_time > 0us) {
obj.pushKV("pingtime", Ticks<SecondsDouble>(stats.m_last_ping_time));
}