iw4x-client/src/Utils/Time.hpp

20 lines
305 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Utils
{
namespace Time
{
class Interval
{
private:
std::chrono::high_resolution_clock::time_point lastPoint;
public:
Interval() : lastPoint(std::chrono::high_resolution_clock::now()) {}
void update();
bool elapsed(std::chrono::nanoseconds nsecs);
};
}
}