2 .\" Copyright (c) 1993 Michael Haardt
4 .\" Fri Apr 2 11:32:09 MET DST 1993
6 .\" SPDX-License-Identifier: GPL-2.0-or-later
8 .\" Modified Sat Jul 24 14:23:14 1993 by Rik Faith (faith@cs.unc.edu)
9 .\" Modified Sun Oct 18 17:31:43 1998 by Andries Brouwer (aeb@cwi.nl)
10 .\" 2008-06-23, mtk, minor rewrites, added some details
12 .TH ftime 3 (date) "Linux man-pages (unreleased)"
14 ftime \- return date and time
17 .RI ( libc ", " \-lc )
20 .B "#include <sys/timeb.h>"
22 .BI "int ftime(struct timeb *" tp );
26 This function is no longer provided by the GNU C library.
31 This function returns the current time as seconds and milliseconds
32 since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
33 The time is returned in
35 which is declared as follows:
41 unsigned short millitm;
48 Here \fItime\fP is the number of seconds since the Epoch,
49 and \fImillitm\fP is the number of milliseconds since \fItime\fP
50 seconds since the Epoch.
51 The \fItimezone\fP field is the local timezone measured in minutes
52 of time west of Greenwich (with a negative value indicating minutes
54 The \fIdstflag\fP field
55 is a flag that, if nonzero, indicates that Daylight Saving time
56 applies locally during the appropriate part of the year.
58 POSIX.1-2001 says that the contents of the \fItimezone\fP and \fIdstflag\fP
59 fields are unspecified; avoid relying on them.
61 This function always returns 0.
62 (POSIX.1-2001 specifies, and some systems document, a \-1 error return.)
64 Starting with glibc 2.33, the
68 header have been removed.
69 To support old binaries,
70 glibc continues to provide a compatibility symbol for
71 applications linked against glibc 2.32 and earlier.
73 For an explanation of the terms used in this section, see
81 Interface Attribute Value
84 T} Thread safety MT-Safe
91 POSIX.1-2008 removes the specification of
94 This function is obsolete.
96 If the time in seconds
102 .BR clock_gettime (2)
103 gives nanoseconds but is not as widely available.
105 Early glibc2 is buggy and returns 0 in the
108 glibc 2.1.1 is correct again.
112 .\" function appeared in 4.2BSD.
114 .BR gettimeofday (2),