diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 27ccd40b7b..b76c173f90 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -84,6 +84,8 @@ #include <openssl/rand.h> #include <openssl/conf.h> +// Application startup time (used for uptime calculation) +const int64_t nStartupTime = GetTime(); const char * const BITCOIN_CONF_FILENAME = "bitcoin.conf"; const char * const BITCOIN_PID_FILENAME = "bitcoind.pid"; @@ -891,3 +893,9 @@ std::string CopyrightHolders(const std::string& strPrefix) } return strCopyrightHolders; } + +// Obtain the application startup time (used for uptime calculation) +int64_t GetStartupTime() +{ + return nStartupTime; +} |