mirror of
https://github.com/StrikerX3/StrikeBox.git
synced 2024-06-23 06:42:44 -04:00
26 lines
382 B
C++
26 lines
382 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <chrono>
|
|
|
|
using namespace std::chrono;
|
|
|
|
namespace strikebox {
|
|
|
|
/*!
|
|
* Simple timer abstraction class for high-precision timing events
|
|
*/
|
|
class Timer {
|
|
protected:
|
|
high_resolution_clock::time_point m_start;
|
|
high_resolution_clock::time_point m_end;
|
|
|
|
public:
|
|
Timer();
|
|
void Start();
|
|
void Stop();
|
|
uint64_t GetMillisecondsElapsed();
|
|
};
|
|
|
|
}
|