rt-thread-official/components/net/uip/doc/html/a00157.html

109 lines
5.2 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>uIP 1.0: Clock interface</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul></div>
<h1>Clock interface</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
The clock interface is the interface between the <a class="el" href="a00156.html">timer library</a> and the platform specific clock functionality.
<p>
The clock interface must be implemented for each platform that uses the <a class="el" href="a00156.html">timer library</a>.<p>
The clock interface does only one this: it measures time. The clock interface provides a macro, CLOCK_SECOND, which corresponds to one second of system time.<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00156.html">Timer library</a> </dd></dl>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge3ced0551b26c9b99cb45a86f34d100a"></a><!-- doxytag: member="clock::CLOCK_SECOND" ref="ge3ced0551b26c9b99cb45a86f34d100a" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#ge3ced0551b26c9b99cb45a86f34d100a">CLOCK_SECOND</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A second, measured in system clock time. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#g78ab77b57cf2e00089f0a3a22508524c">clock_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the clock library. <a href="#g78ab77b57cf2e00089f0a3a22508524c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">clock_time_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#ge5b7160f2e653725ba5e2024c3cb7bff">clock_time</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current clock time. <a href="#ge5b7160f2e653725ba5e2024c3cb7bff"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g78ab77b57cf2e00089f0a3a22508524c"></a><!-- doxytag: member="clock.h::clock_init" ref="g78ab77b57cf2e00089f0a3a22508524c" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void clock_init </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">void&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Initialize the clock library.
<p>
This function initializes the clock library and should be called from the main() function of the system. </td>
</tr>
</table>
<a class="anchor" name="ge5b7160f2e653725ba5e2024c3cb7bff"></a><!-- doxytag: member="clock.h::clock_time" ref="ge5b7160f2e653725ba5e2024c3cb7bff" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">clock_time_t clock_time </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">void&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Get the current clock time.
<p>
This function returns the current system clock time.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The current clock time, measured in system ticks. </dd></dl>
<p>
Referenced by <a class="el" href="a00195.html#l00121">timer_expired()</a>, <a class="el" href="a00195.html#l00104">timer_restart()</a>, and <a class="el" href="a00195.html#l00064">timer_set()</a>. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>