mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Ladybird/Qt: Use a precise timer for event loop timer events
This improves the accuracy of `setTimeout()`.
This commit is contained in:
parent
ee765e241e
commit
a968bc6f80
1 changed files with 1 additions and 0 deletions
|
@ -91,6 +91,7 @@ static void qt_timer_fired(Core::TimerShouldFireWhenNotVisible should_fire_when_
|
|||
intptr_t EventLoopManagerQt::register_timer(Core::EventReceiver& object, int milliseconds, bool should_reload, Core::TimerShouldFireWhenNotVisible should_fire_when_not_visible)
|
||||
{
|
||||
auto timer = new QTimer;
|
||||
timer->setTimerType(Qt::PreciseTimer);
|
||||
timer->setInterval(milliseconds);
|
||||
timer->setSingleShot(!should_reload);
|
||||
auto weak_object = object.make_weak_ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue