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/Timer.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/helpers/Timer.cpp (limited to 'src/helpers/Timer.cpp') diff --git a/src/helpers/Timer.cpp b/src/helpers/Timer.cpp deleted file mode 100644 index e00c5918..00000000 --- a/src/helpers/Timer.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "Timer.hpp" -#include - -void CTimer::reset() { - m_tpLastReset = std::chrono::steady_clock::now(); -} - -std::chrono::steady_clock::duration CTimer::getDuration() { - return std::chrono::steady_clock::now() - m_tpLastReset; -} - -float CTimer::getMillis() { - return std::chrono::duration_cast(getDuration()).count() / 1000.f; -} - -float CTimer::getSeconds() { - return std::chrono::duration_cast(getDuration()).count() / 1000.f; -} - -const std::chrono::steady_clock::time_point& CTimer::chrono() const { - return m_tpLastReset; -} \ No newline at end of file -- cgit v1.2.3