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 {
|
2022-12-16 18:17:31 +01:00
|
|
|
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
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
private:
|
2022-06-24 23:27:02 +02:00
|
|
|
std::chrono::system_clock::time_point m_tpLastReset;
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
std::chrono::system_clock::duration getDuration();
|
2022-06-24 23:27:02 +02:00
|
|
|
};
|