I did a time on my script and this is what I got:
$ time <myscript>
real 7m5.458s
user 0m7.444s
sys 0m3.748s
$
which means that it ran for 7 minutes and 5.458 seconds.
What do the user
and sys
times tell me?
The real
time is the wall clock time. The user
time is the amount of time spent executing the code while not waiting for resources (I/O, network, etc.). The sys
time is the time spent by the kernel on behalf of the program, e.g., executing system calls.
It's the amount of time actually executing code, as opposed to waiting on I/O or etc., in the program itself and in the kernel respectively.