<!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>UbixOS V2: src/sys/kernel/time.c File Reference</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.7 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <div class="nav"> <a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a> » <a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a> » <a class="el" href="dir_7efffd2b1fae7bb6f2aa85845c863494.html">kernel</a></div> <h1>time.c File Reference</h1><code>#include <<a class="el" href="types_8h-source.html">ubixos/types.h</a>></code><br> <code>#include <<a class="el" href="time_8h-source.html">ubixos/time.h</a>></code><br> <code>#include <<a class="el" href="vitals_8h-source.html">ubixos/vitals.h</a>></code><br> <code>#include <<a class="el" href="kprintf_8h-source.html">lib/kprintf.h</a>></code><br> <code>#include <<a class="el" href="assert_8h-source.html">assert.h</a>></code><br> <p> Include dependency graph for time.c:<p><center><img src="time_8c__incl.png" border="0" usemap="#src/sys/kernel/time.c_map" alt=""></center> <map name="src/sys/kernel/time.c_map"> <area href="types_8h.html" shape="rect" coords="743,156,863,183" alt=""> <area href="time_8h.html" shape="rect" coords="579,105,693,132" alt=""> <area href="vitals_8h.html" shape="rect" coords="216,156,336,183" alt=""> <area href="kprintf_8h.html" shape="rect" coords="408,257,507,284" alt=""> <area href="assert_8h.html" shape="rect" coords="239,257,313,284" alt=""> <area href="__types_8h.html" shape="rect" coords="913,156,1017,183" alt=""> <area href="io_8h.html" shape="rect" coords="767,105,839,132" alt=""> <area href="ubthread_8h.html" shape="rect" coords="385,156,529,183" alt=""> <area href="vfs_8h.html" shape="rect" coords="597,207,675,233" alt=""> </map> <p> <a href="time_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="time_8c.html#df30830f5265e55035171c301eb9c3fb">gettimeofday</a> (struct <a class="el" href="structtimeval.html">timeval</a> *tp, struct <a class="el" href="structtimezone.html">timezone</a> *tzp)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="time_8c.html#45c7647a44b3b3eef8e44809180e86b5">time_init</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="time_8c.html#087d7c6ad6802ed3e466ed1d6badf3c9">timeCmosRead</a> (int addr)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="time_8c.html#50a9563bc49b27c587f341b0336bab7e">timeMake</a> (struct <a class="el" href="structtimeStruct.html">timeStruct</a> *time)</td></tr> <tr><td colspan="2"><br><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="time_8c.html#45d9da5c4bcc5def21490ffe633b7702">month</a> [12]</td></tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="df30830f5265e55035171c301eb9c3fb"></a><!-- doxytag: member="time.c::gettimeofday" ref="df30830f5265e55035171c301eb9c3fb" args="(struct timeval *tp, struct timezone *tzp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int gettimeofday </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structtimeval.html">timeval</a> * </td> <td class="paramname"> <em>tp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structtimezone.html">timezone</a> * </td> <td class="paramname"> <em>tzp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="time_8c-source.html#l00110">110</a> of file <a class="el" href="time_8c-source.html">time.c</a>. <p> References <a class="el" href="time_8h-source.html#l00073">timeval::tv_sec</a>, and <a class="el" href="time_8h-source.html#l00074">timeval::tv_usec</a>. </div> </div><p> <a class="anchor" name="45c7647a44b3b3eef8e44809180e86b5"></a><!-- doxytag: member="time.c::time_init" ref="45c7647a44b3b3eef8e44809180e86b5" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int time_init </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="time_8c-source.html#l00056">56</a> of file <a class="el" href="time_8c-source.html">time.c</a>. <p> References <a class="el" href="time_8h-source.html#l00038">BCD_TO_BIN</a>, <a class="el" href="time_8h-source.html#l00061">timeStruct::day</a>, <a class="el" href="time_8h-source.html#l00060">timeStruct::hour</a>, <a class="el" href="kprintf_8c-source.html#l00038">kprintf()</a>, <a class="el" href="time_8h-source.html#l00059">timeStruct::min</a>, <a class="el" href="time_8h-source.html#l00062">timeStruct::mon</a>, <a class="el" href="time_8h-source.html#l00058">timeStruct::sec</a>, <a class="el" href="timer_8S-source.html#l00035">systemVitals</a>, <a class="el" href="time_8c-source.html#l00051">timeCmosRead()</a>, <a class="el" href="time_8c-source.html#l00092">timeMake()</a>, <a class="el" href="vitals_8h-source.html#l00047">vitalsStruct::timeStart</a>, and <a class="el" href="time_8h-source.html#l00063">timeStruct::year</a>. <p> Here is the call graph for this function:<p><center><img src="time_8c_45c7647a44b3b3eef8e44809180e86b5_cgraph.png" border="0" usemap="#time_8c_45c7647a44b3b3eef8e44809180e86b5_cgraph_map" alt=""></center> <map name="time_8c_45c7647a44b3b3eef8e44809180e86b5_cgraph_map"> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="166,6,232,32" alt=""> <area href="time_8c.html#087d7c6ad6802ed3e466ed1d6badf3c9" shape="rect" coords="138,56,260,83" alt=""> <area href="time_8h.html#50a9563bc49b27c587f341b0336bab7e" shape="rect" coords="155,107,243,134" alt=""> <area href="io_8h.html#77b934268de1b3ecdcf3f275413b3108" shape="rect" coords="319,31,412,58" alt=""> <area href="io_8h.html#f0c1dd5717007bf73b6c5119dfe7eaf2" shape="rect" coords="311,82,420,108" alt=""> </map> </div> </div><p> <a class="anchor" name="087d7c6ad6802ed3e466ed1d6badf3c9"></a><!-- doxytag: member="time.c::timeCmosRead" ref="087d7c6ad6802ed3e466ed1d6badf3c9" args="(int addr)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int timeCmosRead </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>addr</em> </td> <td> ) </td> <td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="time_8c-source.html#l00051">51</a> of file <a class="el" href="time_8c-source.html">time.c</a>. <p> References <a class="el" href="io_8c-source.html#l00039">inportByte()</a>, and <a class="el" href="io_8c-source.html#l00088">outportByteP()</a>. <p> Referenced by <a class="el" href="time_8c-source.html#l00056">time_init()</a>. <p> Here is the call graph for this function:<p><center><img src="time_8c_087d7c6ad6802ed3e466ed1d6badf3c9_cgraph.png" border="0" usemap="#time_8c_087d7c6ad6802ed3e466ed1d6badf3c9_cgraph_map" alt=""></center> <map name="time_8c_087d7c6ad6802ed3e466ed1d6badf3c9_cgraph_map"> <area href="io_8h.html#77b934268de1b3ecdcf3f275413b3108" shape="rect" coords="188,5,281,32" alt=""> <area href="io_8h.html#f0c1dd5717007bf73b6c5119dfe7eaf2" shape="rect" coords="180,56,289,83" alt=""> </map> </div> </div><p> <a class="anchor" name="50a9563bc49b27c587f341b0336bab7e"></a><!-- doxytag: member="time.c::timeMake" ref="50a9563bc49b27c587f341b0336bab7e" args="(struct timeStruct *time)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> timeMake </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structtimeStruct.html">timeStruct</a> * </td> <td class="paramname"> <em>time</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="time_8c-source.html#l00092">92</a> of file <a class="el" href="time_8c-source.html">time.c</a>. <p> References <a class="el" href="time_8h-source.html#l00061">timeStruct::day</a>, <a class="el" href="time_8h-source.html#l00042">DAY</a>, <a class="el" href="time_8h-source.html#l00060">timeStruct::hour</a>, <a class="el" href="time_8h-source.html#l00041">HOUR</a>, <a class="el" href="time_8h-source.html#l00059">timeStruct::min</a>, <a class="el" href="time_8h-source.html#l00040">MINUTE</a>, <a class="el" href="time_8h-source.html#l00062">timeStruct::mon</a>, <a class="el" href="time_8c-source.html#l00036">month</a>, <a class="el" href="time_8h-source.html#l00058">timeStruct::sec</a>, <a class="el" href="time_8h-source.html#l00043">YEAR</a>, and <a class="el" href="time_8h-source.html#l00063">timeStruct::year</a>. <p> Referenced by <a class="el" href="time_8c-source.html#l00056">time_init()</a>. </div> </div><p> <hr><h2>Variable Documentation</h2> <a class="anchor" name="45d9da5c4bcc5def21490ffe633b7702"></a><!-- doxytag: member="time.c::month" ref="45d9da5c4bcc5def21490ffe633b7702" args="[12]" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="time_8c.html#45d9da5c4bcc5def21490ffe633b7702">month</a>[12]<code> [static]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <b>Initial value:</b><div class="fragment"><pre class="fragment"> { 0, <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31+30), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31+30+31), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31+30+31+31), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31+30+31+31+30), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31+30+31+31+30+31), <a class="code" href="time_8h.html#509a01c55cbe47386fe24602b7c7fda1">DAY</a>*(31+29+31+30+31+30+31+31+30+31+30) } </pre></div> <p> Definition at line <a class="el" href="time_8c-source.html#l00036">36</a> of file <a class="el" href="time_8c-source.html">time.c</a>. <p> Referenced by <a class="el" href="time_8c-source.html#l00092">timeMake()</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:24:18 2006 for UbixOS V2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>