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/helpers/time/Timer.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/helpers/time/Timer.hpp (limited to 'src/helpers/time/Timer.hpp') diff --git a/src/helpers/time/Timer.hpp b/src/helpers/time/Timer.hpp new file mode 100644 index 00000000..c21f78db --- /dev/null +++ b/src/helpers/time/Timer.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include "Time.hpp" + +class CTimer { + public: + void reset(); + float getSeconds(); + float getMillis(); + const Time::steady_tp& chrono() const; + + private: + Time::steady_tp m_lastReset; + + Time::steady_dur getDuration(); +}; \ No newline at end of file -- cgit v1.2.3