2016-11-05 07:56:12 -04:00
|
|
|
#include "STDInclude.hpp"
|
|
|
|
|
|
|
|
namespace Utils
|
|
|
|
{
|
|
|
|
namespace Time
|
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
void Interval::update()
|
2016-11-05 07:56:12 -04:00
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
this->lastPoint = std::chrono::high_resolution_clock::now();
|
2016-11-05 07:56:12 -04:00
|
|
|
}
|
|
|
|
|
2016-11-20 08:09:07 -05:00
|
|
|
bool Interval::elapsed(std::chrono::nanoseconds nsecs)
|
2016-11-05 07:56:12 -04:00
|
|
|
{
|
2016-11-20 08:09:07 -05:00
|
|
|
return ((std::chrono::high_resolution_clock::now() - this->lastPoint) >= nsecs);
|
2016-11-05 07:56:12 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|