diff options
author | Musab Kılıç <musabkilic@protonmail.com> | 2021-08-27 19:57:20 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-27 23:16:53 +0200 |
commit | 3edeb9b7e7f3aee817554e24fee62a253b5a222d (patch) | |
tree | b37c0e6e015caffc5474ba35972c0a6007c77468 | |
parent | 29a9be650323ea3102219cd77a148c5022f65686 (diff) | |
download | serenity-3edeb9b7e7f3aee817554e24fee62a253b5a222d.zip |
Shell: Use variable instead of iteration_times.size() in builtin_time
-rw-r--r-- | Userland/Shell/Builtin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Shell/Builtin.cpp b/Userland/Shell/Builtin.cpp index 0046c84674..7aab0d120d 100644 --- a/Userland/Shell/Builtin.cpp +++ b/Userland/Shell/Builtin.cpp @@ -946,10 +946,10 @@ int Shell::builtin_time(int argc, const char** argv) float total_time = 0; for (auto time : iteration_times) total_time += static_cast<float>(time); - float average = total_time / iteration_times.size(); + float average = total_time / number_of_iterations; float total_time_excluding_first = total_time - static_cast<float>(iteration_times.first()); - float average_excluding_first = total_time_excluding_first / (iteration_times.size() - 1); + float average_excluding_first = total_time_excluding_first / (number_of_iterations - 1); warnln("Timing report:"); warnln("=============="); |