auto start = high_resolution_clock::now();
auto lastStart = start;
auto time = 0us;
do
{
std::this_thread::yield();
auto timeNow = high_resolution_clock::now();
time += duration_cast<microseconds>(timeNow - lastStart);
lastStart = timeNow;
//std::cout << duration_cast<milliseconds>(time) << std::endl;
}
while(time < Duration && !_isPaused);