mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Shell: Use variable instead of iteration_times.size() in builtin_time
This commit is contained in:
parent
29a9be6503
commit
3edeb9b7e7
Notes:
sideshowbarker
2024-07-18 05:12:17 +09:00
Author: https://github.com/musabkilic Commit: https://github.com/SerenityOS/serenity/commit/3edeb9b7e7f Pull-request: https://github.com/SerenityOS/serenity/pull/9645
1 changed files with 2 additions and 2 deletions
|
@ -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("==============");
|
||||
|
|
Loading…
Reference in a new issue