Answers for "c++ chrono"

C++
3

c++ chrono

std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
//other stuff
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count() 
//time difference in microseconds
Posted by: Guest on February-18-2021

Browse Popular Code Answers by Language