[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

@@ -5,7 +5,7 @@
/**
* Server/client environment: argument handling, config file parsing,
* logging, thread wrappers
* logging, thread wrappers, startup time
*/
#ifndef BITCOIN_UTIL_H
#define BITCOIN_UTIL_H
@@ -28,6 +28,9 @@
#include <boost/signals2/signal.hpp>
#include <boost/thread/exceptions.hpp>
// Application startup time (used for uptime calculation)
int64_t GetStartupTime();
static const bool DEFAULT_LOGTIMEMICROS = false;
static const bool DEFAULT_LOGIPS = false;
static const bool DEFAULT_LOGTIMESTAMPS = true;