4.3BSD beta release manual page
[unix-history] / usr / src / lib / libcompat / 4.1 / ftime.3
CommitLineData
969f1988
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
ce5fb9a7 5.\" @(#)ftime.3 6.1 (Berkeley) %G%
969f1988 6.\"
ce5fb9a7 7.TH TIME 3C ""
969f1988
KM
8.UC 4
9.SH NAME
10time, ftime \- get date and time
11.SH SYNOPSIS
12.nf
13.B long time(0)
14.PP
15.B long time(tloc)
16.B long *tloc;
17.PP
18.B #include <sys/types.h>
19.B #include <sys/timeb.h>
20.B ftime(tp)
21.B struct timeb *tp;
22.fi
23.SH DESCRIPTION
ac4c1774
KM
24.ft B
25These interfaces are obsoleted by gettimeofday(2).
26.ft R
27.PP
969f1988
KM
28.I Time
29returns the time since 00:00:00 GMT, Jan. 1, 1970, measured
30in seconds.
31.PP
32If
33.I tloc
34is nonnull,
35the return value is also stored in the
36place to which
37.I tloc
38points.
39.PP
40The
41.I ftime
42entry fills in a structure pointed to by its argument,
43as defined by
ac4c1774 44.RI < sys/timeb.h >:
969f1988
KM
45.PP
46.ta .5i +\w'unsigned 'u
47.nf
48.so /usr/include/sys/timeb.h
49.fi
50.PP
51The structure contains the time since the epoch in seconds,
52up to 1000 milliseconds of more-precise interval,
53the local time zone (measured in minutes of time westward from Greenwich),
54and a flag that, if nonzero, indicates that
55Daylight Saving time applies locally during the appropriate part of the year.
56.SH "SEE ALSO"
ac4c1774 57date(1), gettimeofday(2), settimeofday(2), ctime(3)