[RPC] Add an uptime command that displays the amount of time that bitcoind has been running

This commit is contained in:
Ricardo Velhote
2017-05-14 19:18:26 +01:00
committed by lateminer
parent 5a5d74b07c
commit 32f0591954
6 changed files with 64 additions and 3 deletions

View File

@@ -97,6 +97,9 @@ namespace boost {
} // namespace boost
// Application startup time (used for uptime calculation)
const int64_t nStartupTime = GetTime();
using namespace std;
const char * const BITCOIN_CONF_FILENAME = "blackmore.conf";
@@ -836,3 +839,9 @@ int GetNumCores()
#endif
}
// Obtain the application startup time (used for uptime calculation)
int64_t GetStartupTime()
{
return nStartupTime;
}