You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mainly the chrono library, including clocks, time_point and duration so that people can easily do dedicated timing of a few lines of code, basically though code like :
#include<chrono>// other clocktypes to high_resolution_clock are steady_clock or system_clock// see https://www.modernescpp.com/index.php/the-three-clocks for details
std::chrono::high_resolution_clock clock;
clock::time_point startTime = clock::now();
... // code to be timed
std::chrono::duration<float> ticks = clock::now() - startTime;
auto millis = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
std::cout << "it took " << duration.count() << " ticks, that is " << millis.count() << " ms\n";
The text was updated successfully, but these errors were encountered:
Mainly the
chrono
library, including clocks,time_point
andduration
so that people can easily do dedicated timing of a few lines of code, basically though code like :The text was updated successfully, but these errors were encountered: