Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

TIME(1V)                                                              TIME(1V)

       time - time a command

       time [ command ]

       /usr/5bin/time [ command ]

       The  System  V  version  of this command is available with the System V
       software installation option.  Refer  to  for  information  on  how  to
       install optional software.

       There  are  three  distinct  versions  of time: it is built in to the C
       shell, and is an executable  program  available  in  /usr/bin/time  and
       /usr/5bin/time  when  using  the Bourne shell.  In each case, times are
       displayed on the diagnostic output stream.

       In the case of the C shell, a time command  with  no  command  argument
       simply  displays a summary of time used by this shell and its children.
       When arguments are given the specified simple command is timed and  the
       C shell displays a time summary as described in csh(1).

       The  time  commands  in /usr/bin/time and /usr/5bin/time time the given
       command, which must be specified, that is, command is not  optional  as
       it  is in the C shell's timing facility.  When the command is complete,
       time displays the elapsed time during the command, the  time  spent  in
       the  system, and the time spent in execution of the command.  Times are
       reported in seconds.  The  only  difference  between  the  versions  in
       /usr/bin/time  and  /usr/5bin/time  is  between  their  output formats;
       /usr/bin/time  prints  all  three  times  on  the  same   line,   while
       /usr/5bin/time prints them on separate lines.

       The three examples here show the differences between the csh version of
       time and the versions in /usr/bin/time and /usr/bin/time.  The  example
       assumes that csh is the shell in use.
              example% time wc /usr/share/man/man1/csh.1
              1876   11223   65895 /usr/share/man/man1/csh.1
              2.7u 0.9s 0:03 91% 3+5k 19+2io 1pf+0w
              example%/usr/bin/time wc /usr/share/man/man1/csh.1
              1876   11223   65895 /usr/share/man/man1/csh.1
              4.3 real         2.7 user         1.0 sys
              example% /usr/5bin/time wc /usr/share/man/man1/csh.1
              1876   11223   65895 /usr/share/man/man1/csh.1
              real        4.3
              user        2.7
              sys         1.0


       Elapsed  time  is  accurate to the second, while the CPU times are mea-
       sured to the 50th second.  Thus the sum of the CPU times can be up to a
       second larger than the elapsed time.

       When  the  command  being  timed is interrupted, the timing values dis-
       played may not always be accurate.

                               19 September 1989                      TIME(1V)