1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

LibCore: Add Core::Timer::set_active(bool)

This calls either start() or stop() depending on the boolean argument.
This commit is contained in:
Andreas Kling 2021-12-25 13:25:24 +01:00
parent ae07660587
commit d0df249666
2 changed files with 10 additions and 0 deletions

View file

@ -37,6 +37,8 @@ public:
void restart(int interval_ms);
void stop();
void set_active(bool);
bool is_active() const { return m_active; }
int interval() const { return m_interval_ms; }
void set_interval(int interval_ms)