📄 ftime.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>ftime</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_005_347"> </a>NAME</h4><blockquote>ftime - get date and time</blockquote><h4><a name = "tag_000_005_348"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="systimeb.h.html">sys/timeb.h</a>>int ftime(struct timeb *<i>tp</i>);</code></pre></blockquote><h4><a name = "tag_000_005_349"> </a>DESCRIPTION</h4><blockquote>The<i>ftime()</i>function sets the<b>time</b>and<b>millitm</b>members of the<b>timeb</b>structure pointed to by<i>tp</i>to contain the seconds and milliseconds portions, respectively, ofthe current time in seconds since 00:00:00 UTC(Coordinated Universal Time), January 1, 1970.The contents of the<b>timezone</b>and<b>dstflag</b>members of<i>tp</i>after a call to<i>ftime()</i>are unspecified.<p>The system clock need not have millisecond granularity. Depending on any granularity (particularly a granularity of one) renders code non-portable.</blockquote><h4><a name = "tag_000_005_350"> </a>RETURN VALUE</h4><blockquote>Upon successful completion, the<i>ftime()</i>function returns 0. Otherwise -1 is returned.</blockquote><h4><a name = "tag_000_005_351"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_005_352"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_005_353"> </a>APPLICATION USAGE</h4><blockquote>For portability to implementations conforming to earlier versions of thisspecification,<i><a href="time.html">time()</a></i>is preferred over this function.</blockquote><h4><a name = "tag_000_005_354"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_005_355"> </a>SEE ALSO</h4><blockquote><i><a href="ctime.html">ctime()</a></i>,<i><a href="gettimeofday.html">gettimeofday()</a></i>,<i><a href="time.html">time()</a></i>,<i><a href="systimeb.h.html"><sys/timeb.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -