Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
You can use high_resolution_clock from <chrono> to get the current tick count from the processor. Record two of such ticks and then compare the difference with some required time duration, and perform some tasks when the count is more than the duration. Read more about high_resolution_clock here : www.cplusplus.com/reference/chrono en.cppreference.com/w/cpp/header/chrono
25th Sep 2018, 12:52 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar