date and time created 90/06/23 17:20:37 by trent
[unix-history] / usr / src / lib / libc / gen / time.3
CommitLineData
af9bf3ab
KB
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)time.3 5.1 (Berkeley) %G%
17.\"
18.TH TIME 3 ""
19.UC 4
20.SH NAME
21time \- get time of day
22.SH SYNOPSIS
23.nf
24.B #include <sys/types.h>
25
26.B time_t time(tloc)
27.B time_t *tloc;
28.fi
29.SH DESCRIPTION
30.PP
31.I Time
32returns the value of time in seconds since 0 hours, 0 minutes,
330 seconds, January 1, 1970, Coordinated Universal Time.
34.PP
35The argument
36.I tloc
37points to an area where the return value is also stored.
38If
39.I tloc
40is a NULL pointer, no value is stored.
41.PP
42Upon successful completion,
43.IR time ()
44returns the value of time.
45Otherwise a value of ((\fItime_t\fR) -1)
46is returned and
47.I errno
48is set to indicate the error.
49.SH "ERRORS
50The following error codes may be set in
51.IR errno :
52.TP 15
53[EFAULT]
54An argument address referenced invalid memory.
55.SH "SEE ALSO"
56gettimeofday(2), ctime(3)