cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

time_8h.html (10700B)


      1<!-- HTML header for doxygen 1.8.14-->
      2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3<html xmlns="http://www.w3.org/1999/xhtml">
      4<head>
      5<meta http-equiv="cache-control" content="max-age=86400"/>
      6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
      8<meta name="generator" content="Doxygen 1.8.20"/>
      9<meta name="viewport" content="width=device-width, initial-scale=1"/>
     10<title>GBDK 2020 Docs: time.h File Reference</title>
     11<link href="tabs.css" rel="stylesheet" type="text/css"/>
     12<script type="text/javascript" src="jquery.js"></script>
     13<script type="text/javascript" src="dynsections.js"></script>
     14<link href="navtree.css" rel="stylesheet" type="text/css"/>
     15<script type="text/javascript" src="resize.js"></script>
     16<script type="text/javascript" src="navtreedata.js"></script>
     17<script type="text/javascript" src="navtree.js"></script>
     18<link href="search/search.css" rel="stylesheet" type="text/css"/>
     19<script type="text/javascript" src="search/searchdata.js"></script>
     20<script type="text/javascript" src="search/search.js"></script>
     21<link href="doxygen.css" rel="stylesheet" type="text/css" />
     22<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
     23</head>
     24<body>
     25<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     26<div id="titlearea">
     27<table cellspacing="0" cellpadding="0">
     28 <tbody>
     29 <tr style="height: 56px;">
     30  <td id="projectalign" style="padding-left: 0.5em;">
     31   <div id="projectname">GBDK 2020 Docs
     32   &#160;<span id="projectnumber">4.0.6</span>
     33   </div>
     34   <div id="projectbrief">API Documentation for GBDK 2020</div>
     35  </td>
     36 </tr>
     37 </tbody>
     38</table>
     39</div>
     40<!-- end header part -->
     41<!-- Generated by Doxygen 1.8.20 -->
     42<script type="text/javascript">
     43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     44var searchBox = new SearchBox("searchBox", "search",false,'Search');
     45/* @license-end */
     46</script>
     47<script type="text/javascript" src="menudata.js"></script>
     48<script type="text/javascript" src="menu.js"></script>
     49<script type="text/javascript">
     50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     51$(function() {
     52  initMenu('',true,false,'search.php','Search');
     53  $(document).ready(function() { init_search(); });
     54});
     55/* @license-end */</script>
     56<div id="main-nav"></div>
     57</div><!-- top -->
     58<div id="side-nav" class="ui-resizable side-nav-resizable">
     59  <div id="nav-tree">
     60    <div id="nav-tree-contents">
     61      <div id="nav-sync" class="sync"></div>
     62    </div>
     63  </div>
     64  <div id="splitbar" style="-moz-user-select:none;" 
     65       class="ui-resizable-handle">
     66  </div>
     67</div>
     68<script type="text/javascript">
     69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     70$(document).ready(function(){initNavTree('time_8h.html',''); initResizable(); });
     71/* @license-end */
     72</script>
     73<div id="doc-content">
     74<!-- window showing the filter options -->
     75<div id="MSearchSelectWindow"
     76     onmouseover="return searchBox.OnSearchSelectShow()"
     77     onmouseout="return searchBox.OnSearchSelectHide()"
     78     onkeydown="return searchBox.OnSearchSelectKey(event)">
     79</div>
     80
     81<!-- iframe showing the search results (closed by default) -->
     82<div id="MSearchResultsWindow">
     83<iframe src="javascript:void(0)" frameborder="0" 
     84        name="MSearchResults" id="MSearchResults">
     85</iframe>
     86</div>
     87
     88<div class="header">
     89  <div class="summary">
     90<a href="#define-members">Macros</a> &#124;
     91<a href="#typedef-members">Typedefs</a> &#124;
     92<a href="#func-members">Functions</a>  </div>
     93  <div class="headertitle">
     94<div class="title">time.h File Reference</div>  </div>
     95</div><!--header-->
     96<div class="contents">
     97<div class="textblock"><code>#include &lt;<a class="el" href="types_8h_source.html">types.h</a>&gt;</code><br />
     98<code>#include &lt;<a class="el" href="stdint_8h_source.html">stdint.h</a>&gt;</code><br />
     99</div>
    100<p><a href="time_8h_source.html">Go to the source code of this file.</a></p>
    101<table class="memberdecls">
    102<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
    103Macros</h2></td></tr>
    104<tr class="memitem:a3d9fc3c745d0880902fe3ea3d5d5f71e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="time_8h.html#a3d9fc3c745d0880902fe3ea3d5d5f71e">CLOCKS_PER_SEC</a>&#160;&#160;&#160;60</td></tr>
    105<tr class="separator:a3d9fc3c745d0880902fe3ea3d5d5f71e"><td class="memSeparator" colspan="2">&#160;</td></tr>
    106</table><table class="memberdecls">
    107<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
    108Typedefs</h2></td></tr>
    109<tr class="memitem:ac84921d4d15eedac7d7b8051a7944c84"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="time_8h.html#ac84921d4d15eedac7d7b8051a7944c84">time_t</a></td></tr>
    110<tr class="separator:ac84921d4d15eedac7d7b8051a7944c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
    111</table><table class="memberdecls">
    112<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
    113Functions</h2></td></tr>
    114<tr class="memitem:acc1f88818af5706d57262377382ae4ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="asm_2gbz80_2types_8h.html#aeb756bd89bf86769edbefdef8135109f">clock_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="time_8h.html#acc1f88818af5706d57262377382ae4ac">clock</a> () <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    115<tr class="separator:acc1f88818af5706d57262377382ae4ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
    116<tr class="memitem:ae7841e681c8c9d59818568d39553642c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="time_8h.html#ac84921d4d15eedac7d7b8051a7944c84">time_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="time_8h.html#ae7841e681c8c9d59818568d39553642c">time</a> (<a class="el" href="time_8h.html#ac84921d4d15eedac7d7b8051a7944c84">time_t</a> *t)</td></tr>
    117<tr class="separator:ae7841e681c8c9d59818568d39553642c"><td class="memSeparator" colspan="2">&#160;</td></tr>
    118</table>
    119<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
    120<div class="textblock"><p>Sort of ANSI compliant time functions. </p>
    121</div><h2 class="groupheader">Macro Definition Documentation</h2>
    122<a id="a3d9fc3c745d0880902fe3ea3d5d5f71e"></a>
    123<h2 class="memtitle"><span class="permalink"><a href="#a3d9fc3c745d0880902fe3ea3d5d5f71e">&#9670;&nbsp;</a></span>CLOCKS_PER_SEC</h2>
    124
    125<div class="memitem">
    126<div class="memproto">
    127      <table class="memname">
    128        <tr>
    129          <td class="memname">#define CLOCKS_PER_SEC&#160;&#160;&#160;60</td>
    130        </tr>
    131      </table>
    132</div><div class="memdoc">
    133
    134</div>
    135</div>
    136<h2 class="groupheader">Typedef Documentation</h2>
    137<a id="ac84921d4d15eedac7d7b8051a7944c84"></a>
    138<h2 class="memtitle"><span class="permalink"><a href="#ac84921d4d15eedac7d7b8051a7944c84">&#9670;&nbsp;</a></span>time_t</h2>
    139
    140<div class="memitem">
    141<div class="memproto">
    142      <table class="memname">
    143        <tr>
    144          <td class="memname">typedef <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="el" href="time_8h.html#ac84921d4d15eedac7d7b8051a7944c84">time_t</a></td>
    145        </tr>
    146      </table>
    147</div><div class="memdoc">
    148
    149</div>
    150</div>
    151<h2 class="groupheader">Function Documentation</h2>
    152<a id="acc1f88818af5706d57262377382ae4ac"></a>
    153<h2 class="memtitle"><span class="permalink"><a href="#acc1f88818af5706d57262377382ae4ac">&#9670;&nbsp;</a></span>clock()</h2>
    154
    155<div class="memitem">
    156<div class="memproto">
    157      <table class="memname">
    158        <tr>
    159          <td class="memname"><a class="el" href="asm_2gbz80_2types_8h.html#aeb756bd89bf86769edbefdef8135109f">clock_t</a> clock </td>
    160          <td>(</td>
    161          <td class="paramname"></td><td>)</td>
    162          <td></td>
    163        </tr>
    164      </table>
    165</div><div class="memdoc">
    166<p>Returns an approximation of processor time used by the program in Clocks</p>
    167<p>The value returned is the CPU time (ticks) used so far as a <a class="el" href="asm_2z80_2types_8h.html#aeb756bd89bf86769edbefdef8135109f">clock_t</a>.</p>
    168<p>To get the number of seconds used, divide by <a class="el" href="time_8h.html#a3d9fc3c745d0880902fe3ea3d5d5f71e">CLOCKS_PER_SEC</a>.</p>
    169<p>This is based on <a class="el" href="sms_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a>, which will wrap around every ~18 minutes. (unsigned 16 bits = 65535 / 60 / 60 = 18.2)</p>
    170<dl class="section see"><dt>See also</dt><dd><a class="el" href="sms_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a>, <a class="el" href="time_8h.html#ae7841e681c8c9d59818568d39553642c">time()</a> </dd></dl>
    171
    172</div>
    173</div>
    174<a id="ae7841e681c8c9d59818568d39553642c"></a>
    175<h2 class="memtitle"><span class="permalink"><a href="#ae7841e681c8c9d59818568d39553642c">&#9670;&nbsp;</a></span>time()</h2>
    176
    177<div class="memitem">
    178<div class="memproto">
    179      <table class="memname">
    180        <tr>
    181          <td class="memname"><a class="el" href="time_8h.html#ac84921d4d15eedac7d7b8051a7944c84">time_t</a> time </td>
    182          <td>(</td>
    183          <td class="paramtype"><a class="el" href="time_8h.html#ac84921d4d15eedac7d7b8051a7944c84">time_t</a> *&#160;</td>
    184          <td class="paramname"><em>t</em></td><td>)</td>
    185          <td></td>
    186        </tr>
    187      </table>
    188</div><div class="memdoc">
    189<p>Converts <a class="el" href="time_8h.html#acc1f88818af5706d57262377382ae4ac">clock()</a> time to Seconds</p>
    190<dl class="params"><dt>Parameters</dt><dd>
    191  <table class="params">
    192    <tr><td class="paramname">t</td><td>If pointer <b>t</b> is not NULL, it's value will be set to the same seconds calculation as returned by the function.</td></tr>
    193  </table>
    194  </dd>
    195</dl>
    196<p>The calculation is <a class="el" href="time_8h.html#acc1f88818af5706d57262377382ae4ac">clock()</a> / CLOCKS_PER_SEC</p>
    197<p>Returns: time in seconds </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="sms_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a>, <a class="el" href="time_8h.html#acc1f88818af5706d57262377382ae4ac">clock()</a> </dd></dl>
    198
    199</div>
    200</div>
    201</div><!-- contents -->
    202</div><!-- doc-content -->
    203<!-- HTML footer for doxygen 1.8.14-->
    204<!-- start footer part -->
    205<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    206</div>
    207</body>
    208</html>