]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Statistics: initialize starting time at startup 2641/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 15 Jul 2015 12:23:47 +0000 (14:23 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 15 Jul 2015 19:58:46 +0000 (21:58 +0200)
pdns/common_startup.cc

index d565133efec957e25afd016b1963ba661bb6b22a..c510e28a0cfd7afe666fab7d5f1992737064b66a 100644 (file)
@@ -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)