/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include "EventLoopPluginSerenity.h" #include #include #include #include namespace Web::Platform { EventLoopPluginSerenity::EventLoopPluginSerenity() = default; EventLoopPluginSerenity::~EventLoopPluginSerenity() = default; void EventLoopPluginSerenity::spin_until(Function goal_condition) { Core::EventLoop::current().spin_until(move(goal_condition)); } void EventLoopPluginSerenity::deferred_invoke(Function function) { VERIFY(function); Core::deferred_invoke(move(function)); } NonnullRefPtr EventLoopPluginSerenity::create_timer() { return TimerSerenity::create(); } void EventLoopPluginSerenity::quit() { Core::EventLoop::current().quit(0); } }