xref: /original-bsd/lib/libc/gen/clock.3 (revision c3e32dec)
1.\" Copyright (c) 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" %sccs.include.redist.man%
9.\"
10.\"     @(#)clock.3	8.1 (Berkeley) 06/04/93
11.\"
12.Dd
13.Dt CLOCK 3
14.Os
15.Sh NAME
16.Nm clock
17.Nd determine processor time used
18.Sh SYNOPSIS
19.Fd #include <sys/types.h>
20.Ft clock_t
21.Fn clock void
22.Sh DESCRIPTION
23The
24.Fn clock
25function
26determines the amount of processor time used since the invocation of the
27calling process, measured in
28.Dv CLK_TCK Ns s.
29.Sh RETURN VALUES
30The
31.Fn clock
32function returns the amount of time used unless an error occurs, in which
33case the return value is \-1.
34.Sh SEE ALSO
35.Xr getrusage 2
36.Sh STANDARDS
37The
38.Fn clock
39function conforms to
40.St -ansiC .
41