From fcc8fef38ff71bc034940cd6a6a20d5cae963c88 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 15 Jul 2015 14:44:27 +0200 Subject: [PATCH] dnsdist: initialize the uptime variable on startup --- pdns/dnsdist-web.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.2