aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
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