Add Timer::disable() to be more explicit than set_next_date(TimePoint::max())
This commit is contained in:
parent
c99731ebf1
commit
e50b5fe137
|
@ -66,7 +66,8 @@ public:
|
|||
~Timer();
|
||||
|
||||
TimePoint next_date() const { return m_date; }
|
||||
void set_next_date(TimePoint date) { m_date = date; }
|
||||
void set_next_date(TimePoint date) { m_date = date; }
|
||||
void disable() { m_date = TimePoint::max(); }
|
||||
void run(EventMode mode);
|
||||
|
||||
private:
|
||||
|
|
|
@ -214,8 +214,8 @@ public:
|
|||
|
||||
void on_disabled(bool temporary) override
|
||||
{
|
||||
m_idle_timer.set_next_date(TimePoint::max());
|
||||
m_fs_check_timer.set_next_date(TimePoint::max());
|
||||
m_idle_timer.disable();
|
||||
m_fs_check_timer.disable();
|
||||
|
||||
if (not temporary and m_hooks_disabled)
|
||||
{
|
||||
|
@ -1136,7 +1136,7 @@ private:
|
|||
if (not temporary)
|
||||
context().print_status({});
|
||||
|
||||
m_idle_timer.set_next_date(TimePoint::max());
|
||||
m_idle_timer.disable();
|
||||
if (context().has_client())
|
||||
context().client().menu_hide();
|
||||
}
|
||||
|
@ -1239,7 +1239,7 @@ public:
|
|||
|
||||
void on_disabled(bool temporary) override
|
||||
{
|
||||
m_idle_timer.set_next_date(TimePoint::max());
|
||||
m_idle_timer.disable();
|
||||
|
||||
if (not temporary)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user