mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibCore: Add Timer::restart() convenience API
This simply restarts the timer with the existing millisecond interval.
This commit is contained in:
@@ -58,6 +58,11 @@ void Timer::start(int interval)
|
|||||||
m_active = true;
|
m_active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Timer::restart()
|
||||||
|
{
|
||||||
|
restart(m_interval);
|
||||||
|
}
|
||||||
|
|
||||||
void Timer::restart(int interval)
|
void Timer::restart(int interval)
|
||||||
{
|
{
|
||||||
if (m_active)
|
if (m_active)
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public:
|
|||||||
|
|
||||||
void start();
|
void start();
|
||||||
void start(int interval);
|
void start(int interval);
|
||||||
|
void restart();
|
||||||
void restart(int interval);
|
void restart(int interval);
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user