1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

LibCore: Add Timer::restart() convenience API

This simply restarts the timer with the existing millisecond interval.
This commit is contained in:
Andreas Kling 2020-06-11 22:35:37 +02:00
parent 5a71a57435
commit 7bb4f3764c
2 changed files with 6 additions and 0 deletions

View file

@ -58,6 +58,11 @@ void Timer::start(int interval)
m_active = true;
}
void Timer::restart()
{
restart(m_interval);
}
void Timer::restart(int interval)
{
if (m_active)

View file

@ -46,6 +46,7 @@ public:
void start();
void start(int interval);
void restart();
void restart(int interval);
void stop();