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