summaryrefslogtreecommitdiff
path: root/src/managers/eventLoop
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-08-30 17:37:52 +0200
committerGitHub <noreply@github.com>2024-08-30 17:37:52 +0200
commitc5fd5771814958ad274ea9abb961fff621a35b9c (patch)
treee955a8465ef0b8680603b8f7860b012b2991a09f /src/managers/eventLoop
parentfbd63543930417f3cefe36bdb9f2cdd20fc3693a (diff)
config: Add a window rule to render while unfocused (#7582)
Diffstat (limited to 'src/managers/eventLoop')
-rw-r--r--src/managers/eventLoop/EventLoopTimer.cpp4
-rw-r--r--src/managers/eventLoop/EventLoopTimer.hpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/managers/eventLoop/EventLoopTimer.cpp b/src/managers/eventLoop/EventLoopTimer.cpp
index d3cfdf8d..b8943b7c 100644
--- a/src/managers/eventLoop/EventLoopTimer.cpp
+++ b/src/managers/eventLoop/EventLoopTimer.cpp
@@ -49,3 +49,7 @@ float CEventLoopTimer::leftUs() {
return std::chrono::duration_cast<std::chrono::microseconds>(*expires - std::chrono::steady_clock::now()).count();
}
+
+bool CEventLoopTimer::armed() {
+ return expires.has_value();
+}
diff --git a/src/managers/eventLoop/EventLoopTimer.hpp b/src/managers/eventLoop/EventLoopTimer.hpp
index ad7d3986..e5a8c5e3 100644
--- a/src/managers/eventLoop/EventLoopTimer.hpp
+++ b/src/managers/eventLoop/EventLoopTimer.hpp
@@ -16,6 +16,7 @@ class CEventLoopTimer {
void cancel();
bool passed();
+ bool armed();
float leftUs();