stdio.h defines BUFSIZ
[unix-history] / usr / src / usr.bin / time / time.1
CommitLineData
c5780706
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
e0844c13 5.\" @(#)time.1 6.2 (Berkeley) %G%
c5780706 6.\"
e5e18cb6 7.TH TIME 1 ""
c5780706
KM
8.UC 4
9.SH NAME
10time \- time a command
11.SH SYNOPSIS
12.B time
e0844c13 13[-l] command
c5780706 14.SH DESCRIPTION
e0844c13
KB
15The given command is executed; after it is complete, \fItime\fP
16prints the elapsed time during the command, the time spent in the
17system, and the time spent in execution of the command. Times are
18reported in seconds. If the \fB-l\fP option is supplied, the
19contents of the \fIrusage\fP structure are printed as well.
c5780706
KM
20.PP
21On a PDP-11, the execution time can depend on what kind of memory
e0844c13
KB
22the program happens to land in; the user time in MOS is often half
23what it is in core.
c5780706 24.PP
e0844c13 25The times are printed on the diagnostic output stream, ``stderr''.
c5780706 26.PP
e0844c13
KB
27\fITime\fP is a built-in command to \fIcsh\fP(1), with a much different
28syntax. This command is available as ``/bin/time'' to \fIcsh\fP users.
c5780706 29.SH BUGS
e0844c13
KB
30Elapsed time is accurate to the second, while the CPU times are measured
31to the 100th second. Thus the sum of the CPU times can be up to a second
32larger than the elapsed time.
33.SH "SEE ALSO"
34include/sys/h/resource.h