From 573fa4f8f927fed349ea6573122d06581f8b23d2 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sun, 23 Sep 2018 16:47:07 -0400 Subject: [PATCH] Added drift offset to UTC label --- mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 79ba504..ead1ce6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -4561,9 +4561,10 @@ void MainWindow::guiUpdate() tx_status_label.setText(""); } + auto drift = DriftingDateTime::drift(); QDateTime t = DriftingDateTime::currentDateTimeUtc(); QString utc = t.date().toString("yyyy MMM dd") + "\n " + - t.time().toString() + " "; + t.time().toString() + (!drift ? " " : QString(" (%1%2ms)").arg(drift > 0 ? "+" : "").arg(drift)); ui->labUTC->setText(utc); auto delta = t.secsTo(m_nextBeacon);