[RPC] Add an uptime command that displays the amount of time that bitcoind has been running
This commit is contained in:
committed by
lateminer
parent
5a5d74b07c
commit
32f0591954
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user