1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>uIP 1.0: Clock interface</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<!-- Generated by Doxygen 1.4.6 --> 8<div class="tabs"> 9 <ul> 10 <li><a href="main.html"><span>Main Page</span></a></li> 11 <li><a href="modules.html"><span>Modules</span></a></li> 12 <li><a href="classes.html"><span>Data Structures</span></a></li> 13 <li><a href="files.html"><span>Files</span></a></li> 14 <li><a href="examples.html"><span>Examples</span></a></li> 15 </ul></div> 16<h1>Clock interface</h1><hr><a name="_details"></a><h2>Detailed Description</h2> 17The clock interface is the interface between the <a class="el" href="a00156.html">timer library</a> and the platform specific clock functionality. 18<p> 19The clock interface must be implemented for each platform that uses the <a class="el" href="a00156.html">timer library</a>.<p> 20The 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> 21<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00156.html">Timer library</a> </dd></dl> 22 23<p> 24<table border="0" cellpadding="0" cellspacing="0"> 25<tr><td></td></tr> 26<tr><td colspan="2"><br><h2>Defines</h2></td></tr> 27<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge3ced0551b26c9b99cb45a86f34d100a"></a><!-- doxytag: member="clock::CLOCK_SECOND" ref="ge3ced0551b26c9b99cb45a86f34d100a" args="" --> 28#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#ge3ced0551b26c9b99cb45a86f34d100a">CLOCK_SECOND</a></td></tr> 29 30<tr><td class="mdescLeft"> </td><td class="mdescRight">A second, measured in system clock time. <br></td></tr> 31<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 32<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#g78ab77b57cf2e00089f0a3a22508524c">clock_init</a> (void)</td></tr> 33 34<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the clock library. <a href="#g78ab77b57cf2e00089f0a3a22508524c"></a><br></td></tr> 35<tr><td class="memItemLeft" nowrap align="right" valign="top">clock_time_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#ge5b7160f2e653725ba5e2024c3cb7bff">clock_time</a> (void)</td></tr> 36 37<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current clock time. <a href="#ge5b7160f2e653725ba5e2024c3cb7bff"></a><br></td></tr> 38</table> 39<hr><h2>Function Documentation</h2> 40<a class="anchor" name="g78ab77b57cf2e00089f0a3a22508524c"></a><!-- doxytag: member="clock.h::clock_init" ref="g78ab77b57cf2e00089f0a3a22508524c" args="(void)" --><p> 41<table class="mdTable" cellpadding="2" cellspacing="0"> 42 <tr> 43 <td class="mdRow"> 44 <table cellpadding="0" cellspacing="0" border="0"> 45 <tr> 46 <td class="md" nowrap valign="top">void clock_init </td> 47 <td class="md" valign="top">( </td> 48 <td class="md" nowrap valign="top">void </td> 49 <td class="mdname1" valign="top" nowrap> </td> 50 <td class="md" valign="top"> ) </td> 51 <td class="md" nowrap></td> 52 </tr> 53 </table> 54 </td> 55 </tr> 56</table> 57<table cellspacing="5" cellpadding="0" border="0"> 58 <tr> 59 <td> 60 61 </td> 62 <td> 63 64<p> 65Initialize the clock library. 66<p> 67This function initializes the clock library and should be called from the main() function of the system. </td> 68 </tr> 69</table> 70<a class="anchor" name="ge5b7160f2e653725ba5e2024c3cb7bff"></a><!-- doxytag: member="clock.h::clock_time" ref="ge5b7160f2e653725ba5e2024c3cb7bff" args="(void)" --><p> 71<table class="mdTable" cellpadding="2" cellspacing="0"> 72 <tr> 73 <td class="mdRow"> 74 <table cellpadding="0" cellspacing="0" border="0"> 75 <tr> 76 <td class="md" nowrap valign="top">clock_time_t clock_time </td> 77 <td class="md" valign="top">( </td> 78 <td class="md" nowrap valign="top">void </td> 79 <td class="mdname1" valign="top" nowrap> </td> 80 <td class="md" valign="top"> ) </td> 81 <td class="md" nowrap></td> 82 </tr> 83 </table> 84 </td> 85 </tr> 86</table> 87<table cellspacing="5" cellpadding="0" border="0"> 88 <tr> 89 <td> 90 91 </td> 92 <td> 93 94<p> 95Get the current clock time. 96<p> 97This function returns the current system clock time.<p> 98<dl compact><dt><b>Returns:</b></dt><dd>The current clock time, measured in system ticks. </dd></dl> 99 100<p> 101Referenced 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> 102 </tr> 103</table> 104<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by 105<a href="http://www.doxygen.org/index.html"> 106<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> 107</body> 108</html> 109