Hyprland/src/helpers/Timer.hpp
Vaxry 1d70962892 core: move to steady_clock where applicable
avoid issues when system clock gets desynchronized or changed
2024-06-25 16:05:47 +02:00

16 lines
No EOL
435 B
C++

#pragma once
#include <chrono>
class CTimer {
public:
void reset();
float getSeconds();
int getMillis();
const std::chrono::steady_clock::time_point& chrono() const;
private:
std::chrono::steady_clock::time_point m_tpLastReset;
std::chrono::steady_clock::duration getDuration();
};