'\"macro stdmacro
.if n .pH g2.time @(#)time	40.15 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} time 2 "" "\&"
.if \nX=1 .ds x} time 2 ""
.if \nX=2 .ds x} time 2 "" "\&"
.if \nX=3 .ds x} time "" "" "\&"
.TH \*(x}
.SH NAME
\f4time\f1 \- get time
.SH SYNOPSIS
\f4#include <sys/types.h>\f1
.br
\f4#include <time.h>\f1
.PP
\f4time_t time(time_t \(**tloc);\f1
.SH DESCRIPTION
\f4time\fP
returns the value of time in seconds since 00:00:00 \s-1UTC\s0, January 1, 1970.
.PP
If
.I tloc\^
is non-zero, the return value is also stored in the
location to which
.I tloc\^
points.
.SH "SEE ALSO"
\f4stime\fP(2),
\f4ctime\fP(3C)
.SH NOTES
\f4time\fP
fails and its actions are undefined if
.IR tloc
points to an illegal address.
.SH DIAGNOSTICS
Upon successful completion,
\f4time\fP
returns the value of time.
Otherwise, a value of \f4(time_t)\-1\fP is returned and
\f4errno\fP
is set to indicate the error.
.\"	@(#)time.2	6.2 of 9/6/83
.Ee
