mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 12:12:53 +00:00
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
43 lines
967 B
C++
43 lines
967 B
C++
/*
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibCore/Forward.h>
|
|
#include <LibWeb/Platform/Timer.h>
|
|
|
|
namespace Web::Platform {
|
|
|
|
class TimerSerenity final : public Timer {
|
|
GC_CELL(TimerSerenity, Timer);
|
|
|
|
public:
|
|
static GC::Ref<TimerSerenity> create(GC::Heap&);
|
|
|
|
virtual ~TimerSerenity();
|
|
|
|
virtual void start() override;
|
|
virtual void start(int interval_ms) override;
|
|
virtual void restart() override;
|
|
virtual void restart(int interval_ms) override;
|
|
virtual void stop() override;
|
|
|
|
virtual void set_active(bool) override;
|
|
|
|
virtual bool is_active() const override;
|
|
virtual int interval() const override;
|
|
virtual void set_interval(int interval_ms) override;
|
|
|
|
virtual bool is_single_shot() const override;
|
|
virtual void set_single_shot(bool) override;
|
|
|
|
private:
|
|
TimerSerenity();
|
|
|
|
NonnullRefPtr<Core::Timer> m_timer;
|
|
};
|
|
|
|
}
|