Hyprland/src/helpers/Timer.hpp

16 lines
435 B
C++
Raw Normal View History

2022-06-24 23:27:02 +02:00
#pragma once
2023-08-07 13:35:19 +02:00
#include <chrono>
2022-06-24 23:27:02 +02:00
class CTimer {
public:
2023-08-05 23:29:33 +02:00
void reset();
float getSeconds();
long getMillis();
const std::chrono::steady_clock::time_point& chrono() const;
2022-06-24 23:27:02 +02:00
private:
std::chrono::steady_clock::time_point m_tpLastReset;
2022-06-24 23:27:02 +02:00
std::chrono::steady_clock::duration getDuration();
2022-06-24 23:27:02 +02:00
};