Kernel: Shell 'time' prints the time even if command fails

This commit is contained in:
Bananymous 2023-04-01 00:30:33 +03:00
parent 990887891e
commit f453e8e170
1 changed files with 3 additions and 1 deletions

View File

@ -275,9 +275,11 @@ argument_done:
auto new_args = arguments;
new_args.remove(0);
auto start = PIT::ms_since_boot();
TRY(process_command(new_args));
auto ret = process_command(new_args);
auto duration = PIT::ms_since_boot() - start;
TTY_PRINTLN("took {} ms", duration);
if (ret.is_error())
return ret.error();
}
else if (arguments.front() == "thread")
{