diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2020-03-03 08:35:01 -0500 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2020-03-04 13:44:25 -0500 |
commit | b054c46977667953593819248c167545aa3e7a40 (patch) | |
tree | 229182b06f83362f065d920e9accb1fbe4741393 /src/qt/guiutil.cpp | |
parent | ac5c5d0162a963be6fbaa53261c01705436a65f3 (diff) |
refactor: Convert ping time from double to int64_t
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 911322092c..88dc87a7fc 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -778,6 +778,11 @@ QString formatPingTime(double dPingTime) return (dPingTime == std::numeric_limits<int64_t>::max()/1e6 || dPingTime == 0) ? QObject::tr("N/A") : QString(QObject::tr("%1 ms")).arg(QString::number((int)(dPingTime * 1000), 10)); } +QString formatPingTime(int64_t ping_usec) +{ + return (ping_usec == std::numeric_limits<int64_t>::max() || ping_usec == 0) ? QObject::tr("N/A") : QString(QObject::tr("%1 ms")).arg(QString::number((int)(ping_usec / 1000), 10)); +} + QString formatTimeOffset(int64_t nTimeOffset) { return QString(QObject::tr("%1 s")).arg(QString::number((int)nTimeOffset, 10)); |