new copyright; att/bsd/shared
[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.\"
91cff1e1 4.\" %sccs.include.redist.man%
af9bf3ab 5.\"
91cff1e1 6.\" @(#)time.3 5.2 (Berkeley) %G%
af9bf3ab
KB
7.\"
8.TH TIME 3 ""
9.UC 4
10.SH NAME
11time \- get time of day
12.SH SYNOPSIS
13.nf
14.B #include <sys/types.h>
15
16.B time_t time(tloc)
17.B time_t *tloc;
18.fi
19.SH DESCRIPTION
20.PP
21.I Time
22returns the value of time in seconds since 0 hours, 0 minutes,
230 seconds, January 1, 1970, Coordinated Universal Time.
24.PP
25The argument
26.I tloc
27points to an area where the return value is also stored.
28If
29.I tloc
30is a NULL pointer, no value is stored.
31.PP
32Upon successful completion,
33.IR time ()
34returns the value of time.
35Otherwise a value of ((\fItime_t\fR) -1)
36is returned and
37.I errno
38is set to indicate the error.
39.SH "ERRORS
40The following error codes may be set in
41.IR errno :
42.TP 15
43[EFAULT]
44An argument address referenced invalid memory.
45.SH "SEE ALSO"
46gettimeofday(2), ctime(3)