wiki:Documentation/timer

timer

The timer script is a variant of the Unix time command; timer has been modified to pass SIGTERM to the child process.

Usage

usage: timer [-a] [-h | -p] [-o file] utility [argument ...]

An adaptation of the standard 'time' utility that passes SIGTERM to
  the child process.

Options:
  -a                     When the -o option is specified, append timing data
  -h                     Convert time in days, minutes and seconds
  --help                 Print this help information
  -o FILE                Send timing information to a file
  -p                     Print the timing data in the Posix format

Description

The timer command extends the semantics of the Unix time command to send termination signals to subprocesses. This seems a natural behavior for this command, and timer has proven useful in applications where cron processes need to be monitored.

Example

Consider the following use of the standard Unix time command:

/usr/bin/time ls -R /

If the SIGTERM signal is sent to the time process, then the ls process will continue. However, if you use timer, then the SIGTERM signal is sent to the ls process, which terminates it as expected.