__time.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <html>
  2. <head>
  3. <title>__time</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>__time</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. __time - get time of day
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;time.h&gt;<br>
  13. <br>
  14. time_t<br>
  15. __time(time_t *<em>seconds</em>, uint32_t *nanoseconds);
  16. <h3>Description</h3>
  17. The current time (in seconds and nanoseconds since midnight GMT on
  18. January 1, 1970) is retrieved. If <em>seconds</em> and/or
  19. <em>nanoseconds</em> are non-null, the corresponding components of the
  20. time are stored through those pointers. The time in seconds is also
  21. returned.
  22. <p>
  23. <h3>Return Values</h3>
  24. __time returns 0 on success. On error, -1 is returned, and
  25. errno is set to indicate the error.
  26. <h3>Errors</h3>
  27. The following error is the only way __time should be capable of failing.
  28. <blockquote><table width=90%>
  29. <td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
  30. <tr><td>EFAULT</td> <td><em>seconds</em> or <em>nanoseconds</em>
  31. was an invalid non-NULL address.</td></tr>
  32. </table></blockquote>
  33. <h3>See Also</h3>
  34. <A HREF=../libc/time.html>time</A><br>
  35. </body>
  36. </html>