Browse Source

add client startup time as an entry to debug.log (note: logged time in debug.log differs by a few seconds from the one displayed in the Debug window) / make ClientModel::formatClientStartupTime() return a QString

pull/1/head
Philip Kaufmann 10 years ago
parent
commit
41c6b8abc6
  1. 1
      src/init.cpp
  2. 4
      src/qt/clientmodel.cpp
  3. 2
      src/qt/clientmodel.h
  4. 2
      src/qt/rpcconsole.cpp

1
src/init.cpp

@ -414,6 +414,7 @@ bool AppInit2() @@ -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;

4
src/qt/clientmodel.cpp

@ -130,9 +130,9 @@ QString ClientModel::clientName() const @@ -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

2
src/qt/clientmodel.h

@ -41,7 +41,7 @@ public: @@ -41,7 +41,7 @@ public:
QString formatFullVersion() const;
QString formatBuildDate() const;
QString clientName() const;
QDateTime formatClientStartupTime() const;
QString formatClientStartupTime() const;
private:
OptionsModel *optionsModel;

2
src/qt/rpcconsole.cpp

@ -163,7 +163,7 @@ void RPCConsole::setClientModel(ClientModel *model) @@ -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());

Loading…
Cancel
Save