|
|
@ -24,16 +24,16 @@ public: |
|
|
|
std::cout << "Task 1" << std::endl; |
|
|
|
std::cout << "Task 1" << std::endl; |
|
|
|
Result result1 = Task1(); |
|
|
|
Result result1 = Task1(); |
|
|
|
auto stop1 = high_resolution_clock::now(); |
|
|
|
auto stop1 = high_resolution_clock::now(); |
|
|
|
auto dur1 = duration_cast<milliseconds>(stop1 - start); |
|
|
|
auto dur1 = duration_cast<microseconds>(stop1 - start); |
|
|
|
std::cout << "Result: " << result1 << std::endl; |
|
|
|
std::cout << "Result: " << result1 << std::endl; |
|
|
|
std::cout << "Duration: " << dur1.count() << "ms" << std::endl; |
|
|
|
std::cout << "Duration: " << double(dur1.count()) / 1000. << "ms" << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
std::cout << "Task 2" << std::endl; |
|
|
|
std::cout << "Task 2" << std::endl; |
|
|
|
Result result2 = Task2(); |
|
|
|
Result result2 = Task2(); |
|
|
|
auto stop2 = high_resolution_clock::now(); |
|
|
|
auto stop2 = high_resolution_clock::now(); |
|
|
|
auto dur2 = duration_cast<milliseconds>(stop2 - stop1); |
|
|
|
auto dur2 = duration_cast<microseconds>(stop2 - stop1); |
|
|
|
std::cout << "Result: " << result2 << std::endl; |
|
|
|
std::cout << "Result: " << result2 << std::endl; |
|
|
|
std::cout << "Duration: " << dur2.count() << "ms" << std::endl << std::endl; |
|
|
|
std::cout << "Duration: " << double(dur2.count()) / 1000. << "ms" << std::endl << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|