May 2017
Intermediate to advanced
590 pages
17h 18m
English
To measure the execution of a function, you must perform the following steps:
auto start = std::chrono::high_resolution_clock::now();
func();
auto diff = std::chrono::high_resolution_clock::now() - start;
std::cout << std::chrono::duration<double,std::milli>(diff).count() << "ms" << std::endl; std::cout << std::chrono::duration<double,std::nano>(diff).count() << "ns" << std::endl;
To implement this ...
Read now
Unlock full access