iw4x-client/src/Utils/Time.hpp

18 lines
292 B
C++
Raw Normal View History

2016-11-05 07:56:12 -04:00
namespace Utils
{
namespace Time
{
class Interval
{
private:
std::chrono::high_resolution_clock::time_point lastPoint;
2016-11-05 07:56:12 -04:00
public:
Interval() : lastPoint(std::chrono::high_resolution_clock::now()) {}
2016-11-05 07:56:12 -04:00
void update();
bool elapsed(std::chrono::nanoseconds nsecs);
2016-11-05 07:56:12 -04:00
};
}
}