2.9BSD/usr/man/man2/time.2

Compare this file to the similar file:
Show the results in this format:

.TH TIME 2 
.UC
.SH NAME
time, ftime \- get date and time
.SH SYNOPSIS
.B #include <sys/types.h>
.sp
.B time_t time((time_t *) 0)
.PP
.B time_t time(tloc)
.br
.B time_t *tloc;
.sp
.B #include <sys/types.h>
.br
.B #include <sys/timeb.h>
.sp
.B ftime(tp)
.br
.B struct timeb *tp;
.SH DESCRIPTION
.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
.IR <sys/timeb.h> :
.PP
.nf
.ta .5i +\w'unsigned 'u
/*
 * Structure returned by ftime system call
 */
struct timeb {
	time_t	time;
	u_short	millitm;
	short	timezone;
	short	dstflag;
};
.fi
.PP
The structure contains the time since the epoch in seconds,
up to 1000 milliseconds of more-precise interval,
the local timezone (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 ERRORS
.I Ftime
will fail if:
.TP 20
[EFAULT]
.I Tp
points to an address outside the process's allocated address space.
.SH "SEE ALSO"
date(1), stime(2), ctime(3)
.SH ASSEMBLER
(ftime = 35.)
.br
.B sys ftime; bufptr
.PP
(time = 13.; obsolete call)
.br
.B sys time
.br
(time since 1970 in r0-r1)