Commit | Line | Data |
---|---|---|
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 | |
10 | time, 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 |
25 | These interfaces are obsoleted by gettimeofday(2). | |
26 | .ft R | |
27 | .PP | |
969f1988 KM |
28 | .I Time |
29 | returns the time since 00:00:00 GMT, Jan. 1, 1970, measured | |
30 | in seconds. | |
31 | .PP | |
32 | If | |
33 | .I tloc | |
34 | is nonnull, | |
35 | the return value is also stored in the | |
36 | place to which | |
37 | .I tloc | |
38 | points. | |
39 | .PP | |
40 | The | |
41 | .I ftime | |
42 | entry fills in a structure pointed to by its argument, | |
43 | as 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 | |
51 | The structure contains the time since the epoch in seconds, | |
52 | up to 1000 milliseconds of more-precise interval, | |
53 | the local time zone (measured in minutes of time westward from Greenwich), | |
54 | and a flag that, if nonzero, indicates that | |
55 | Daylight Saving time applies locally during the appropriate part of the year. | |
56 | .SH "SEE ALSO" | |
ac4c1774 | 57 | date(1), gettimeofday(2), settimeofday(2), ctime(3) |