diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-26 01:55:17 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-26 01:55:17 -0700 |
commit | 1e07068adf86cbcdd22cda657204090707469d7e (patch) | |
tree | 401167aeae1e7d234deb9456e7491ba4f6fcdb35 /src | |
parent | 4e6e3293ff377854487bdf01a77dafb22955ed91 (diff) | |
parent | 41c6b8abc60f90e73ae4ad89b0a922638a61bbea (diff) |
Merge pull request #1370 from Diapolo/add_startuptime_to_log
add client startup time as an entry to debug.log
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 1 | ||||
-rw-r--r-- | src/qt/clientmodel.cpp | 4 | ||||
-rw-r--r-- | src/qt/clientmodel.h | 2 | ||||
-rw-r--r-- | src/qt/rpcconsole.cpp | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp index c01dc27086..27a42025eb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -414,6 +414,7 @@ bool AppInit2() ShrinkDebugFile(); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("Bitcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str()); + printf("Startup time: %s\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); printf("Default data directory %s\n", GetDefaultDataDir().string().c_str()); std::ostringstream strErrors; diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 64fd2a9450..cabbd5d240 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -130,9 +130,9 @@ QString ClientModel::clientName() const return QString::fromStdString(CLIENT_NAME); } -QDateTime ClientModel::formatClientStartupTime() const +QString ClientModel::formatClientStartupTime() const { - return QDateTime::fromTime_t(nClientStartupTime); + return QDateTime::fromTime_t(nClientStartupTime).toString(); } // Handlers for core signals diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index 0349c389c5..70d816ba9d 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -41,7 +41,7 @@ public: QString formatFullVersion() const; QString formatBuildDate() const; QString clientName() const; - QDateTime formatClientStartupTime() const; + QString formatClientStartupTime() const; private: OptionsModel *optionsModel; diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 7029ee33bc..830ce4face 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -163,7 +163,7 @@ void RPCConsole::setClientModel(ClientModel *model) ui->clientVersion->setText(model->formatFullVersion()); ui->clientName->setText(model->clientName()); ui->buildDate->setText(model->formatBuildDate()); - ui->startupTime->setText(model->formatClientStartupTime().toString()); + ui->startupTime->setText(model->formatClientStartupTime()); setNumConnections(model->getNumConnections()); ui->isTestNet->setChecked(model->isTestNet()); |