manual page distributed with 4.1BSD
[unix-history] / usr / src / lib / libcompat / 4.1 / ftime.3
... / ...
CommitLineData
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.\"
5.\" @(#)ftime.3 6.1 (Berkeley) %G%
6.\"
7.TH TIME 3C ""
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
24.ft B
25These interfaces are obsoleted by gettimeofday(2).
26.ft R
27.PP
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
44.RI < sys/timeb.h >:
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"
57date(1), gettimeofday(2), settimeofday(2), ctime(3)