Function execution time Example. (C++)


std::chrono::system_clock::time_point start = std::chrono::system_clock::now();

myFunc();

std::chrono::duration<double> sec = std::chrono::system_clock::now() - start;

std::cout << "The time taken to perform the function myFunc()  : " << sec.count() << " seconds" << std::endl;


2 comments:

Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore!

 🏙️ Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore! 🚨 Are you thinking about buying an apartment in 2025? 🏢  It’...