date
The date command can be used like a stopwatch, except that it uses the clock provided by the system. The date command is issued before the program is run and right after the program finishes. Figure 1.3 shows the output of the date command and the dbench program, which is a file system benchmark program. The execution time is 29 minutes and 59 seconds. This is the difference between the two times shown in the figure (17:52:24 – 17:22:25 = 29 minutes 59 seconds).
Figure 1.3 Using date to measure dbench timing.