X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftimer.cpp;h=c499b7991e724904e1f63c033b2367ac9c35cdfb;hb=e2b0f3dc9ef4d56c71d7abda13e6139ca092e387;hp=1c8de4cb98f019be1c8e6cee9f6d840f48e5fa4f;hpb=82435b6fa8805baa65e04a582f3e4a2c84237f73;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/timer.cpp b/src/timer.cpp index 1c8de4cb9..c499b7991 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -1,10 +1,14 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2017 Sadie Powell + * Copyright (C) 2013-2014 Attila Molnar + * Copyright (C) 2012 Robby + * Copyright (C) 2009 Uli Schlachter + * Copyright (C) 2009 Daniel De Graaf * Copyright (C) 2008 Robin Burchell * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2006-2007 Craig Edwards - * Copyright (C) 2006 Oliver Lupton + * Copyright (C) 2006-2007, 2010 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -22,7 +26,7 @@ #include "inspircd.h" -void Timer::SetInterval(time_t newinterval) +void Timer::SetInterval(unsigned int newinterval) { ServerInstance->Timers.DelTimer(this); secs = newinterval; @@ -30,6 +34,13 @@ void Timer::SetInterval(time_t newinterval) ServerInstance->Timers.AddTimer(this); } +Timer::Timer(unsigned int secs_from_now, bool repeating) + : trigger(ServerInstance->Time() + secs_from_now) + , secs(secs_from_now) + , repeat(repeating) +{ +} + Timer::~Timer() { ServerInstance->Timers.DelTimer(this);