BSD 4_2 development
[unix-history] / usr / man / man3 / time.3c
CommitLineData
0fff7ecb
C
1.TH TIME 3C "1 April 1983"
2.UC 4
3.SH NAME
4time, ftime \- get date and time
5.SH SYNOPSIS
6.nf
7.B long time(0)
8.PP
9.B long time(tloc)
10.B long *tloc;
11.PP
12.B #include <sys/types.h>
13.B #include <sys/timeb.h>
14.B ftime(tp)
15.B struct timeb *tp;
16.fi
17.SH DESCRIPTION
18.ft B
19These interfaces are obsoleted by gettimeofday(2).
20.ft R
21.PP
22.I Time
23returns the time since 00:00:00 GMT, Jan. 1, 1970, measured
24in seconds.
25.PP
26If
27.I tloc
28is nonnull,
29the return value is also stored in the
30place to which
31.I tloc
32points.
33.PP
34The
35.I ftime
36entry fills in a structure pointed to by its argument,
37as defined by
38.RI < sys/timeb.h >:
39.PP
40.ta .5i +\w'unsigned 'u
41.nf
42.so /usr/include/sys/timeb.h
43.fi
44.PP
45The structure contains the time since the epoch in seconds,
46up to 1000 milliseconds of more-precise interval,
47the local time zone (measured in minutes of time westward from Greenwich),
48and a flag that, if nonzero, indicates that
49Daylight Saving time applies locally during the appropriate part of the year.
50.SH "SEE ALSO"
51date(1), gettimeofday(2), settimeofday(2), ctime(3)