Shell: Use String::join for the command in timing report

This commit is contained in:
Ralf Donau 2021-08-23 22:22:29 +02:00 committed by Andreas Kling
parent b28b4c643e
commit 19aeb71d15
Notes: sideshowbarker 2024-07-18 05:20:27 +09:00

View file

@ -9,6 +9,7 @@
#include "Shell/Formatter.h"
#include <AK/LexicalPath.h>
#include <AK/ScopeGuard.h>
#include <AK/String.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
#include <LibCore/File.h>
@ -951,10 +952,7 @@ int Shell::builtin_time(int argc, const char** argv)
warnln("Timing report:");
warnln("==============");
warn("Command: ");
for (auto& string : args)
warn("{} ", string);
warnln("");
warnln("Command: {}", String::join(' ', args));
warnln("Average time: {} ms", average);
warnln("Excluding first: {} ms", average_excluding_first);
}