Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <ratio>
- #include <chrono>
- using namespace std;
- using namespace chrono;
- int main () {
- high_resolution_clock::time_point t1 = high_resolution_clock::now();
- // прога
- high_resolution_clock::time_point t2 = high_resolution_clock::now();
- duration<double> time_span = duration_cast< duration<double> >(t2 - t1);
- cout << endl << "It took me " << time_span.count() << " seconds" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment