{"id":7083,"date":"2022-12-20T19:35:13","date_gmt":"2022-12-20T22:35:13","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ftime-man3\/"},"modified":"2022-12-20T19:35:13","modified_gmt":"2022-12-20T22:35:13","slug":"ftime-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ftime-man3\/","title":{"rendered":"FTIME (man3)"},"content":{"rendered":"<h1 align=\"center\">FTIME<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#RETURN VALUE\">RETURN VALUE<\/a><br \/> <a href=\"#ATTRIBUTES\">ATTRIBUTES<\/a><br \/> <a href=\"#CONFORMING TO\">CONFORMING TO<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ftime \u2212 return date and time<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <sys\/timeb.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>int ftime(struct timeb *<\/b><i>tp<\/i><b>);<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>NOTE<\/b>: This function is deprecated, and will be removed in a future version of the GNU C library. Use <b>clock_gettime<\/b>(2) instead.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This function returns the current time as seconds and milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). The time is returned in <i>tp<\/i>, which is declared as follows:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">struct timeb { <br \/> time_t time; <br \/> unsigned short millitm; <br \/> short timezone; <br \/> short dstflag; <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Here <i>time<\/i> is the number of seconds since the Epoch, and <i>millitm<\/i> is the number of milliseconds since <i>time<\/i> seconds since the Epoch. The <i>timezone<\/i> field is the local timezone measured in minutes of time west of Greenwich (with a negative value indicating minutes east of Greenwich). The <i>dstflag<\/i> field is a flag that, if nonzero, indicates that Daylight Saving time applies locally during the appropriate part of the year.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">POSIX.1-2001 says that the contents of the <i>timezone<\/i> and <i>dstflag<\/i> fields are unspecified; avoid relying on them.<\/p>\n<h2>RETURN VALUE <a name=\"RETURN VALUE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This function always returns 0. (POSIX.1-2001 specifies, and some systems document, a \u22121 error return.)<\/p>\n<h2>ATTRIBUTES <a name=\"ATTRIBUTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">For an explanation of the terms used in this section, see <b>attributes<\/b>(7).<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-1646121.png\" alt=\"Image grohtml-1646121.png\"><\/p>\n<h2>CONFORMING TO <a name=\"CONFORMING TO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">4.2BSD, POSIX.1-2001. POSIX.1-2008 removes the specification of <b>ftime<\/b>().<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This function is obsolete. Don\u2019t use it. If the time in seconds suffices, <b>time<\/b>(2) can be used; <b>gettimeofday<\/b>(2) gives microseconds; <b>clock_gettime<\/b>(2) gives nanoseconds but is not as widely available.<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Early glibc2 is buggy and returns 0 in the <i>millitm<\/i> field; glibc 2.1.1 is correct again.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>gettimeofday<\/b>(2), <b>time<\/b>(2)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ftime \u2212 return date and time <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,3427,3007],"class_list":["post-7083","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-ftime","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7083"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7083\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}