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