[BACK]Return to time.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / time

Annotation of src/usr.bin/time/time.1, Revision 1.8

1.8     ! aaron       1: .\"    $OpenBSD: time.1,v 1.7 1999/06/05 01:21:43 aaron Exp $
1.1       deraadt     2: .\"    $NetBSD: time.1,v 1.5 1994/12/08 09:36:57 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1980, 1991, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\" 3. All advertising materials mentioning features or use of this software
                     16: .\"    must display the following acknowledgement:
                     17: .\"    This product includes software developed by the University of
                     18: .\"    California, Berkeley and its contributors.
                     19: .\" 4. Neither the name of the University nor the names of its contributors
                     20: .\"    may be used to endorse or promote products derived from this software
                     21: .\"    without specific prior written permission.
                     22: .\"
                     23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33: .\" SUCH DAMAGE.
                     34: .\"
                     35: .\"     @(#)time.1     8.1 (Berkeley) 6/6/93
                     36: .\"
                     37: .Dd June 6, 1993
                     38: .Dt TIME 1
                     39: .Os
                     40: .Sh NAME
                     41: .Nm time
                     42: .Nd time command execution
                     43: .Sh SYNOPSIS
                     44: .Nm time
                     45: .Op Fl lp
                     46: .Ar utility
                     47: .Sh DESCRIPTION
1.7       aaron      48: .Nm
1.1       deraadt    49: executes and
                     50: times
                     51: .Ar utility .
                     52: After the
                     53: .Ar utility
                     54: finishes,
1.7       aaron      55: .Nm
1.1       deraadt    56: writes the total time elapsed,
                     57: the time consumed by system overhead,
1.7       aaron      58: and the time used to execute
                     59: .Ar utility
1.1       deraadt    60: to the standard error stream.
                     61: Times are reported in seconds.
                     62: .Pp
1.8     ! aaron      63: The options are as follows:
1.1       deraadt    64: .Bl -tag -width Ds
                     65: .It Fl l
                     66: The contents of the
                     67: .Em rusage
                     68: structure are printed.
                     69: .It Fl p
                     70: The output is formatted as specified by
                     71: .St -p1003.2-92 .
                     72: .El
                     73: .Pp
                     74: .Xr csh 1
1.5       aaron      75: has its own and syntactically different built-in version of
1.6       aaron      76: .Nm time .
1.1       deraadt    77: The utility described here
                     78: is available as
                     79: .Pa /usr/bin/time
                     80: to
                     81: .Xr csh
                     82: users.
                     83: .Sh DIAGNOSTICS
                     84: The
1.7       aaron      85: .Nm
1.1       deraadt    86: utility shall exit with one of the following values:
                     87: .Bl -tag -width indent
1.7       aaron      88: .It 1\-125
                     89: An error occurred in the
                     90: .Nm
1.1       deraadt    91: utility.
                     92: .It 126
1.7       aaron      93: The
1.1       deraadt    94: .Ar utility
                     95: was found but could not be invoked.
                     96: .It 127
1.7       aaron      97: The
1.1       deraadt    98: .Ar utility
                     99: could not be found.
                    100: .El
                    101: .Pp
1.7       aaron     102: Otherwise, the exit status of
                    103: .Nm
                    104: shall be that of
1.1       deraadt   105: .Ar utility .
                    106: .Sh SEE ALSO
1.4       aaron     107: .Xr csh 1 ,
1.3       deraadt   108: .Xr getrusage 2
1.1       deraadt   109: .Sh FILES
1.3       deraadt   110: .Bl -tag -width /usr/include/sys/resource.h -compact
                    111: .It Pa /usr/include/sys/resource.h
1.1       deraadt   112: .El
                    113: .Sh STANDARDS
                    114: The
                    115: .Nm
1.7       aaron     116: utility conforms to
1.1       deraadt   117: .St -p1003.2-92 .
                    118: .Sh BUGS
                    119: The granularity of seconds on microprocessors is crude and
                    120: can result in times being reported for CPU usage which are too large by
                    121: a second.