Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (t - u) time(1)
NAME
time - Times the execution of a command
SYNOPSIS
time [-p] command [argument ...]
The time command prints the elapsed time during the execution of a command, the time
spent in the system, and the time spent in execution of the command on the diagnostic out-
put system.
FLAGS
-p Writes the timing output to standard error. This is the default.
DESCRIPTION
Time is reported in seconds.
The time command (with a different format) is also built into sh.
EXAMPLES
To measure the time required to run a program, enter:
time a.out
This runs the program a.out and writes to the standard error output the amount of real, system,
and user time that it uses:
real 10.5
user 0.3
sys 3.6
EXIT VALUES
The time command returns the following exit values:
1-125 An error occurred.
126 The utility was found but could not be invoked.
127 The utility could not be found.
RELATED INFORMATION
Commands: sh(1).
527188-004 Hewlett-Packard Company 9−13