2016-11-25 07:00:48 -05:00
|
|
|
namespace Utils
|
|
|
|
{
|
2016-11-05 07:56:12 -04:00
|
|
|
namespace Time
|
2016-11-25 07:00:48 -05:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|