Print time in miliseconds

This commit is contained in:
Manuel Thalmann 2023-12-12 19:20:54 +01:00
parent bbfbbc4908
commit ba48c564ce

View file

@ -206,7 +206,8 @@ int main(int argc, char* argv[])
}
const auto end{std::chrono::steady_clock::now()};
const std::chrono::duration<double> elapsed_seconds{end - start};
auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed_seconds).count();
std::cout << "AES (" << cycles << " runs)\nElapsed time: ";
std::cout << elapsed_seconds.count() << "s\n"; // Before C++20
std::cout << milliseconds << "ms\n"; // Before C++20
}