From: Pieter Lexis Date: Wed, 15 Jul 2015 12:44:27 +0000 (+0200) Subject: dnsdist: initialize the uptime variable on startup X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~57^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcc8fef38ff71bc034940cd6a6a20d5cae963c88;p=thirdparty%2Fpdns.git dnsdist: initialize the uptime variable on startup --- diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index e9f98c6a86..9f677fb982 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -13,10 +13,10 @@ #include "htmlfiles.h" #include "base64.hh" +static time_t s_start=time(0); static int uptimeOfProcess() { - static time_t start=time(0); - return time(0) - start; + return time(0) - s_start; }