diff options
author | Sadie Powell <sadie@witchery.services> | 2024-02-11 17:53:32 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-02-11 17:56:35 +0000 |
commit | 30b9f127113cc715cf90f87a298572b8a73b6788 (patch) | |
tree | 9c3ceafda20a3d370425f38086e8b3fc7e7698b7 /src | |
parent | 5337326cc976612657677c41d7a1d7bb1e671968 (diff) |
Remove the now parameter from the Timer class.
This was never actually changed from the default.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 10 | ||||
-rw-r--r-- | src/timers.cpp | 15 | ||||
-rw-r--r-- | src/uplink.cpp | 5 |
3 files changed, 16 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2f1f2ca91..83ddfa13f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,7 +45,10 @@ class UpdateTimer final : public Timer { public: - UpdateTimer(time_t timeout) : Timer(timeout, Anope::CurTime, true) { } + UpdateTimer(time_t timeout) + : Timer(timeout, true) + { + } void Tick(time_t) override { @@ -57,7 +60,10 @@ class ExpireTimer final : public Timer { public: - ExpireTimer(time_t timeout) : Timer(timeout, Anope::CurTime, true) { } + ExpireTimer(time_t timeout) + : Timer(timeout, true) + { + } void Tick(time_t) override { diff --git a/src/timers.cpp b/src/timers.cpp index 0d3f3b205..74641e40f 100644 --- a/src/timers.cpp +++ b/src/timers.cpp @@ -11,24 +11,22 @@ std::multimap<time_t, Timer *> TimerManager::Timers; -Timer::Timer(long time_from_now, time_t now, bool repeating) +Timer::Timer(long time_from_now, bool repeating) { owner = NULL; - trigger = now + time_from_now; + trigger = Anope::CurTime + time_from_now; secs = time_from_now; repeat = repeating; - settime = now; TimerManager::AddTimer(this); } -Timer::Timer(Module *creator, long time_from_now, time_t now, bool repeating) +Timer::Timer(Module *creator, long time_from_now, bool repeating) { owner = creator; - trigger = now + time_from_now; + trigger = Anope::CurTime + time_from_now; secs = time_from_now; repeat = repeating; - settime = now; TimerManager::AddTimer(this); } @@ -55,11 +53,6 @@ bool Timer::GetRepeat() const return repeat; } -time_t Timer::GetSetTime() const -{ - return settime; -} - void Timer::SetSecs(time_t t) { TimerManager::DelTimer(this); diff --git a/src/uplink.cpp b/src/uplink.cpp index 087e5a476..60e278dce 100644 --- a/src/uplink.cpp +++ b/src/uplink.cpp @@ -21,7 +21,10 @@ class ReconnectTimer final : public Timer { public: - ReconnectTimer(int wait) : Timer(wait) { } + ReconnectTimer(int wait) + : Timer(wait) + { + } void Tick(time_t) override { |