From 877fb5b93ada9b25b4d2f5ca5f69370fa345f1ac Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 16 Apr 2025 01:37:48 +0100 Subject: time: move to stl's clocks and move timer --- src/managers/eventLoop/EventLoopTimer.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/managers/eventLoop/EventLoopTimer.hpp') diff --git a/src/managers/eventLoop/EventLoopTimer.hpp b/src/managers/eventLoop/EventLoopTimer.hpp index e5a8c5e3..d093cd6e 100644 --- a/src/managers/eventLoop/EventLoopTimer.hpp +++ b/src/managers/eventLoop/EventLoopTimer.hpp @@ -5,14 +5,15 @@ #include #include "../../helpers/memory/Memory.hpp" +#include "../../helpers/time/Time.hpp" class CEventLoopTimer { public: - CEventLoopTimer(std::optional timeout, std::function self, void* data)> cb_, void* data_); + CEventLoopTimer(std::optional timeout, std::function self, void* data)> cb_, void* data_); // if not specified, disarms. // if specified, arms. - void updateTimeout(std::optional timeout); + void updateTimeout(std::optional timeout); void cancel(); bool passed(); @@ -25,8 +26,8 @@ class CEventLoopTimer { void call(SP self); private: - std::function self, void* data)> cb; - void* data = nullptr; - std::optional expires; - bool wasCancelled = false; + std::function self, void* data)> m_cb; + void* m_data = nullptr; + std::optional m_expires; + bool m_wasCancelled = false; }; -- cgit v1.2.3