Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
QNX Community Resources

QNX Community Resources

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Next]

time

Determine the execution time of a command (UNIX)

Syntax:

time command

Options:

command
The command, including any of its options, for which the execution time will be determined.

Description:

The time utility and the time shell built-in time the execution time of command, which must be specified. When execution of command is complete, the time utility displays the total elapsed time for execution, the time spent in the system, and the time spent in executing command. Times are reported in hours, minutes, and seconds.

Times are not always accurate to the milliseconds as displayed, depending on the tick size (see the ticksize utility).

Examples:

Time the execution of dcheck -b2048 /dev/hd0:

    time dcheck -b2048 /dev/hd0

Exit status:

The time utility exits with the exit status of the command that was timed.

Caveats:

The time command will not obtain execution information from a remote node. To time remote programs, run time on the same machine as the program being timed, e.g.:

    on -n 61 time sleep 30

NOT:

    time on -n 61 sleep 30

See also:

date, ticksize


[Previous] [Contents] [Next]