1FTIME(3) Linux Programmer's Manual FTIME(3)
2
3
4
6 ftime - return date and time
7
9 #include <sys/timeb.h>
10
11 int ftime(struct timeb *tp);
12
14 Return current date and time in tp, which is declared as follows:
15
16 struct timeb {
17 time_t time;
18 unsigned short millitm;
19 short timezone;
20 short dstflag;
21 };
22
23 Here time is the number of seconds since the epoch, millitm is the num‐
24 ber of milliseconds since time seconds since the epoch, timezone is the
25 local time zone measured in minutes of time west of Greenwich, and dst‐
26 flag is a flag that, if non-zero, indicates that Daylight Saving time
27 applies locally during the appropriate part of the year.
28
29 These days the contents of the timezone and dstflag fields are unde‐
30 fined.
31
33 This function always returns 0.
34
36 This function is obsolete. Don't use it. If the time in seconds suf‐
37 fices, time(2) can be used; gettimeofday(2) gives microseconds;
38 clock_gettime(3) gives nanoseconds but is not yet widely available.
39
40 Under libc4 and libc5 the millitm field is meaningful. But early
41 glibc2 is buggy and returns 0 there; glibc 2.1.1 is correct again.
42
44 The ftime() function appeared in 4.2BSD.
45
47 4.2BSD, POSIX.1-2001.
48
50 gettimeofday(2), time(2)
51
52
53
54Linux 2001-12-14 FTIME(3)