Hyprland/src/helpers/Timer.hpp

16 lines
443 B
C++
Raw Normal View History

2022-06-24 23:27:02 +02:00
#pragma once
#include "../defines.hpp"
class CTimer {
public:
2023-08-05 23:29:33 +02:00
void reset();
float getSeconds();
int getMillis();
const std::chrono::system_clock::time_point& chrono() const;
2022-06-24 23:27:02 +02:00
private:
2022-06-24 23:27:02 +02:00
std::chrono::system_clock::time_point m_tpLastReset;
std::chrono::system_clock::duration getDuration();
2022-06-24 23:27:02 +02:00
};