aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-08 18:05:10 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-08 18:05:23 +0200
commit84c8506e90c01b4ba38c19064389d8549593be2f (patch)
treebe3df9dae80d861245944dc257a7aff28002509d /src/qt/clientmodel.cpp
parent8ffec99b071df945e4d6c59641a89a8bd409c4ec (diff)
Display a "freshness" indicator instead of nr of blocks
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 06ad5adfc8..8885b4cb5b 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -7,6 +7,7 @@
#include "headers.h"
#include <QTimer>
+#include <QDateTime>
ClientModel::ClientModel(CWallet *wallet, QObject *parent) :
QObject(parent), wallet(wallet), optionsModel(0)
@@ -30,6 +31,11 @@ int ClientModel::getNumBlocks() const
return nBestHeight;
}
+QDateTime ClientModel::getLastBlockDate() const
+{
+ return QDateTime::fromTime_t(pindexBest->GetBlockTime());
+}
+
void ClientModel::update()
{
// Plainly emit all signals for now. To be more efficient this should check