mirror of
https://github.com/anope/anope.git
synced 2026-06-12 15:44:46 +02:00
Deduplicate the timer constructors with delegation.
This commit is contained in:
+1
-4
@@ -18,11 +18,8 @@
|
||||
std::multimap<time_t, Timer *> TimerManager::Timers;
|
||||
|
||||
Timer::Timer(time_t time_from_now)
|
||||
: trigger(Anope::CurTime + std::abs(time_from_now))
|
||||
, secs(time_from_now)
|
||||
: Timer(nullptr, time_from_now)
|
||||
{
|
||||
if (time_from_now)
|
||||
TimerManager::AddTimer(this);
|
||||
}
|
||||
|
||||
Timer::Timer(Module *creator, time_t time_from_now)
|
||||
|
||||
Reference in New Issue
Block a user