time - report how long a command takes
time command
time a.out # Report how long a.out takes time ls -l *.c # Report how long ls takes
The command is executed and the real time, user time, and system time (in hours, minutes, and seconds) are printed. Shell scripts cannot be timed.
times(2).