diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2011-06-09 06:16:31 +0200 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2011-06-09 06:16:31 +0200 |
commit | 717b4c3406a8247561de8d36526bb7c32a7af4e7 (patch) | |
tree | 624b9598b8ec3a44cb6c979289bf24554f3b3fb3 | |
parent | 74361bec0586466bda872d2d846a768d95d6cd5f (diff) |
small improvement for Timer::SetSecs()
-rw-r--r-- | include/timers.h | 2 | ||||
-rw-r--r-- | src/timers.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/timers.h b/include/timers.h index 71ab8a153..28d5a9a10 100644 --- a/include/timers.h +++ b/include/timers.h @@ -90,7 +90,7 @@ class CoreExport Timer : public Extensible */ class CoreExport TimerManager : public Extensible { - protected: + friend class Timer; /** A list of timers */ static std::vector<Timer *> Timers; diff --git a/src/timers.cpp b/src/timers.cpp index 0a40106d6..a8cef007b 100644 --- a/src/timers.cpp +++ b/src/timers.cpp @@ -72,6 +72,8 @@ time_t Timer::GetSetTime() const void Timer::SetSecs(time_t t) { secs = t; + trigger = Anope::CurTime + t; + sort(TimerManager::Timers.begin(), TimerManager::Timers.end(), TimerManager::TimerComparison); } /** Returns the interval between ticks |