mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
Shell: Use variable instead of iteration_times.size() in builtin_time
This commit is contained in:
parent
29a9be6503
commit
3edeb9b7e7
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…
Add table
Add a link
Reference in a new issue