From 76ebc88ccd6fef0bf2d97b607829fb3466e273af Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Aug 2006 09:23:46 +0000 Subject: extern time_t TIME -> InspIRCd::Time() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4873 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 50d9b0631..6d4bcfe3e 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -43,8 +43,6 @@ #include "typedefs.h" #include "inspircd.h" -extern time_t TIME; - static char TIMESTR[26]; static time_t LAST = 0; @@ -75,13 +73,14 @@ void InspIRCd::Log(int level, const std::string &text) if ((level < ServerInstance->Config->LogLevel) && !ServerInstance->Config->forcedebug) return; - if (TIME != LAST) + if (ServerInstance->Time() != LAST) { - struct tm *timeinfo = localtime(&TIME); + time_t local = ServerInstance->Time(); + struct tm *timeinfo = localtime(&local); strlcpy(TIMESTR,asctime(timeinfo),26); TIMESTR[24] = ':'; - LAST = TIME; + LAST = ServerInstance->Time(); } if (ServerInstance->Config->log_file && ServerInstance->Config->writelog) -- cgit v1.3.1-10-gc9f91