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