aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/rpcconsole.h')
-rw-r--r--src/qt/rpcconsole.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 5f308dc36d..27d4c42eb4 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -168,6 +168,11 @@ private:
/** Update UI with latest network info from model. */
void updateNetworkState();
+ /** Helper for the output of a time duration field. Inputs are UNIX epoch times. */
+ QString TimeDurationField(uint64_t time_now, uint64_t time_at_event) const {
+ return time_at_event ? GUIUtil::formatDurationStr(time_now - time_at_event) : tr("Never");
+ }
+
private Q_SLOTS:
void updateAlerts(const QString& warnings);
};