Maddie Slockbower 3c3fdbcae8 - External Libraries
- Base Engine Functionality
- Node Renderer
2024-07-15 20:42:24 -04:00

27 lines
561 B
C++

//
// Created by Maddie on 6/20/2024.
//
#ifndef TIMER_H
#define TIMER_H
#include <chrono>
namespace OpenShaderDesigner
{
class Timer
{
public:
Timer() : Start(std::chrono::high_resolution_clock::now()) { }
void Reset() { Start = std::chrono::high_resolution_clock::now(); }
[[nodiscard]] double Poll() const
{ return std::chrono::duration<double>(std::chrono::high_resolution_clock::now() - Start).count(); }
private:
std::chrono::high_resolution_clock::time_point Start;
};
}
#endif //TIMER_H