Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <chrono>
- using namespace std;
- using namespace std::chrono;
- int main()
- {
- // Get starting timepoint
- auto start = high_resolution_clock::now();
- // PROGRAM PROCESSES FOUND HERE
- // Get ending timepoint
- auto stop = high_resolution_clock::now();
- // Get duration. Substart timepoints to
- // get durarion. To cast it to proper unit
- // use duration cast method
- auto duration = duration_cast<microseconds>(stop - start);
- cout << "Time taken by function: "
- << duration.count() << " microseconds" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement