4.3BSD/usr/man/man3/time.3c

.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)time.3c	6.1 (Berkeley) 5/9/85
.\"
.TH TIME 3C "May 9, 1985" 
.UC 4
.SH NAME
time, ftime \- get date and time
.SH SYNOPSIS
.nf
.B long time(0)
.PP
.B long time(tloc)
.B long *tloc;
.PP
.B #include <sys/types.h>
.B #include <sys/timeb.h>
.B ftime(tp)
.B struct timeb *tp;
.fi
.SH DESCRIPTION
.ft B
These interfaces are obsoleted by gettimeofday(2).
.ft R
.PP
.I Time
returns the time since 00:00:00 GMT, Jan. 1, 1970, measured
in seconds.
.PP
If
.I tloc
is nonnull,
the return value is also stored in the
place to which
.I tloc
points.
.PP
The
.I ftime
entry fills in a structure pointed to by its argument,
as defined by
.RI < sys/timeb.h >:
.PP
.ta .5i +\w'unsigned 'u
.nf
.so /usr/include/sys/timeb.h
.fi
.PP
The structure contains the time since the epoch in seconds,
up to 1000 milliseconds of more-precise interval,
the local time zone (measured in minutes of time westward from Greenwich),
and a flag that, if nonzero, indicates that
Daylight Saving time applies locally during the appropriate part of the year.
.SH "SEE ALSO"
date(1), gettimeofday(2), settimeofday(2), ctime(3)