aboutsummaryrefslogtreecommitdiff
path: root/src/win/native/timer.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-28 00:03:11 +0800
committercrupest <crupest@outlook.com>2020-06-28 00:03:11 +0800
commit06d1d0442276a05b6caad6e3468f4afb1e8ee5df (patch)
treeebd46f0fb7343dc57bf947b7b5fffc139c3ddeac /src/win/native/timer.hpp
parente11be6caa9ef9b2b198ca61846e32f469627556e (diff)
downloadcru-06d1d0442276a05b6caad6e3468f4afb1e8ee5df.tar.gz
cru-06d1d0442276a05b6caad6e3468f4afb1e8ee5df.tar.bz2
cru-06d1d0442276a05b6caad6e3468f4afb1e8ee5df.zip
...
Diffstat (limited to 'src/win/native/timer.hpp')
-rw-r--r--src/win/native/timer.hpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/win/native/timer.hpp b/src/win/native/timer.hpp
deleted file mode 100644
index 95f186a1..00000000
--- a/src/win/native/timer.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#pragma once
-#include "cru/win/WinPreConfig.hpp"
-
-#include "cru/common/Base.hpp"
-#include "cru/win/native/GodWindow.hpp"
-
-#include <chrono>
-#include <functional>
-#include <map>
-#include <optional>
-
-namespace cru::platform::native::win {
-using TimerAction = std::function<void()>;
-
-class TimerManager : public Object {
- public:
- TimerManager(GodWindow* god_window);
-
- CRU_DELETE_COPY(TimerManager)
- CRU_DELETE_MOVE(TimerManager)
-
- ~TimerManager() override = default;
-
- UINT_PTR CreateTimer(UINT milliseconds, bool loop, TimerAction action);
- void KillTimer(UINT_PTR id);
- std::optional<std::pair<bool, TimerAction>> GetAction(UINT_PTR id);
-
- private:
- GodWindow* god_window_;
-
- std::map<UINT_PTR, std::pair<bool, TimerAction>> map_{};
- UINT_PTR current_count_ = 0;
-};
-} // namespace cru::platform::native::win