From: Pieter Lexis Date: Wed, 15 Jul 2015 12:23:47 +0000 (+0200) Subject: Statistics: initialize starting time at startup X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2641%2Fhead;p=thirdparty%2Fpdns.git Statistics: initialize starting time at startup --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index d565133efe..c510e28a0c 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -175,10 +175,10 @@ void declareArguments() ::arg().set("security-poll-suffix","Domain name from which to query security update notifications")="secpoll.powerdns.com."; } +static time_t s_start=time(0); static uint64_t uptimeOfProcess(const std::string& str) { - static time_t start=time(0); - return time(0) - start; + return time(0) - s_start; } static uint64_t getSysUserTimeMsec(const std::string& str)