mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
LibWeb: Convert Platform::Timer to JS::SafeFunction
This commit is contained in:
parent
4bc0d8e4c8
commit
90cc45b7ec
2 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ NonnullRefPtr<Timer> Timer::create()
|
|||
return EventLoopPlugin::the().create_timer();
|
||||
}
|
||||
|
||||
NonnullRefPtr<Timer> Timer::create_repeating(int interval_ms, Function<void()>&& timeout_handler)
|
||||
NonnullRefPtr<Timer> Timer::create_repeating(int interval_ms, JS::SafeFunction<void()>&& timeout_handler)
|
||||
{
|
||||
auto timer = EventLoopPlugin::the().create_timer();
|
||||
timer->set_single_shot(false);
|
||||
|
@ -26,7 +26,7 @@ NonnullRefPtr<Timer> Timer::create_repeating(int interval_ms, Function<void()>&&
|
|||
return timer;
|
||||
}
|
||||
|
||||
NonnullRefPtr<Timer> Timer::create_single_shot(int interval_ms, Function<void()>&& timeout_handler)
|
||||
NonnullRefPtr<Timer> Timer::create_single_shot(int interval_ms, JS::SafeFunction<void()>&& timeout_handler)
|
||||
{
|
||||
auto timer = EventLoopPlugin::the().create_timer();
|
||||
timer->set_single_shot(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue