I need to get the elapsed time from a while.
something.start() auto start = std::chrono::steadyt_clock::now(); while(something->is_valid()) { // getting frames auto end = std::chrono::steady_clock::now(); auto diff = end - start; // do something with the frames if(diff % 3 == 0) { /* do something with the something */ } } But it get the time in every ms i get the time and my if statement runs too much. I can not use std::this_thread::sleep_for() cause i need every frame to catch. How can i do it pararell?