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();
|
2024-10-12 02:29:51 +02:00
|
|
|
float getMillis();
|
2024-06-25 16:05:39 +02:00
|
|
|
const std::chrono::steady_clock::time_point& chrono() const;
|
2022-06-24 23:27:02 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
private:
|
2024-06-25 16:05:39 +02:00
|
|
|
std::chrono::steady_clock::time_point m_tpLastReset;
|
2022-06-24 23:27:02 +02:00
|
|
|
|
2024-06-25 16:05:39 +02:00
|
|
|
std::chrono::steady_clock::duration getDuration();
|
2022-06-24 23:27:02 +02:00
|
|
|
};
|