time.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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>ptr</em>);
  16. <h3>Description</h3>
  17. The current time (in seconds since midnight GMT on January 1, 1970) is
  18. retrieved. If <em>ptr</em> is non-null, the time is stored through
  19. <em>ptr</em>. The time is also returned.
  20. <p>
  21. time is a wrapper around the system call
  22. <A HREF=../syscall/__time.html>__time</A>, which returns nanoseconds
  23. as well as seconds.
  24. <h3>Return Values</h3>
  25. time returns the time. On error, -1 is returned, and errno is set to
  26. indicate the error.
  27. <h3>Errors</h3>
  28. The following error is the only way time should be capable of failing.
  29. <blockquote><table width=90%>
  30. <td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
  31. <tr><td>EFAULT</td> <td><em>ptr</em> was an invalid non-NULL
  32. address.</td></tr>
  33. </table></blockquote>
  34. </body>
  35. </html>