diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-04 16:16:50 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-04 16:16:50 +0200 |
commit | 04b9dc2d30cfc9b383029f6a4b02e2725108b0ae (patch) | |
tree | e117a998173b767f9fd009d49c4f8573d8b85432 /LibCore/CTimer.h | |
parent | 63814ffebf16291419745cd8ba29a4d2fd888563 (diff) | |
download | serenity-04b9dc2d30cfc9b383029f6a4b02e2725108b0ae.zip |
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
Diffstat (limited to 'LibCore/CTimer.h')
-rw-r--r-- | LibCore/CTimer.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/LibCore/CTimer.h b/LibCore/CTimer.h deleted file mode 100644 index b6c1c2005f..0000000000 --- a/LibCore/CTimer.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include <AK/Function.h> -#include <LibCore/CObject.h> - -class CTimer final : public CObject { -public: - explicit CTimer(CObject* parent = nullptr); - CTimer(int interval, Function<void()>&& timeout_handler, CObject* parent = nullptr); - virtual ~CTimer() override; - - void start(); - void start(int interval); - void restart(int interval); - void stop(); - - bool is_active() const { return m_active; } - int interval() const { return m_interval; } - void set_interval(int interval) - { - if (m_interval == interval) - return; - m_interval = interval; - m_interval_dirty = true; - } - - bool is_single_shot() const { return m_single_shot; } - void set_single_shot(bool single_shot) { m_single_shot = single_shot; } - - Function<void()> on_timeout; - - virtual const char* class_name() const override { return "CTimer"; } - -private: - virtual void timer_event(CTimerEvent&) override; - - bool m_active { false }; - bool m_single_shot { false }; - bool m_interval_dirty { false }; - int m_interval { 0 }; -}; |