Skip to content

Commit

Permalink
LibWeb: Use Core::Timer in AnimationFrameCallbackDriver
Browse files Browse the repository at this point in the history
There was no need to use a Platform::Timer here since we're not making
use of the automatic SafeFunction behavior anyway.
  • Loading branch information
awesomekling committed Apr 3, 2024
1 parent 7e39724 commit 58a76c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Userland/Libraries/LibWeb/HTML/AnimationFrameCallbackDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <AK/Function.h>
#include <AK/HashMap.h>
#include <AK/IDAllocator.h>
#include <LibCore/Timer.h>
#include <LibWeb/HTML/EventLoop/EventLoop.h>
#include <LibWeb/Platform/Timer.h>

namespace Web::HTML {

Expand All @@ -19,9 +19,9 @@ struct AnimationFrameCallbackDriver {

AnimationFrameCallbackDriver()
{
m_timer = Platform::Timer::create_single_shot(16, [] {
m_timer = MUST(Core::Timer::create_single_shot(16, [] {
HTML::main_thread_event_loop().schedule();
});
}));
}

i32 add(Callback handler)
Expand Down Expand Up @@ -58,7 +58,7 @@ struct AnimationFrameCallbackDriver {
private:
OrderedHashMap<i32, Callback> m_callbacks;
IDAllocator m_id_allocator;
RefPtr<Platform::Timer> m_timer;
RefPtr<Core::Timer> m_timer;
};

}

0 comments on commit 58a76c1

Please sign in to comment.