--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>o-du/phy: xran_timer.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">o-du/phy
+ </div>
+ <div id="projectbrief">Intel O-RAN/X-RAN Generated Doxygen Documentation</div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_a4c74d6baed87eba72f3b201b7b4b8f2.html">fhi_lib</a></li><li class="navelem"><a class="el" href="dir_5cc0cc0264b57168b75ca56bde6cc403.html">lib</a></li><li class="navelem"><a class="el" href="dir_7b477aa413287cfa2199e983b77d66dd.html">api</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">xran_timer.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="xran__timer_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/******************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">*</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">* Copyright (c) 2019 Intel.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">*</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">* Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">* you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">* You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">*</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">* http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">*</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">* Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">* distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">* See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">* limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">*</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*******************************************************************************/</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#ifndef _XRAN_TIMER_H</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#define _XRAN_TIMER_H</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <time.h></span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include <stdio.h></span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <stdlib.h></span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <stdint.h></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="xran__timer_8h.html#a222f9dff749accf8de62bc4b52c7bdcd"> 40</a></span> <span class="preprocessor">#define MSEC_PER_SEC 1000L</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="xran__timer_8h.html#acdb0852cc30aec56cfe119620ec7ba7d"> 42</a></span> <span class="preprocessor">#define XranIncrementSymIdx(sym_idx, numSymPerMs) (((uint32_t)sym_idx >= (((uint32_t)numSymPerMs * MSEC_PER_SEC) - 1)) ? 0 : (uint32_t)sym_idx+1)</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="xran__timer_8h.html#adad74a9ce67793dc420e0a5045f22cb0"> 43</a></span> <span class="preprocessor">#define XranDecrementSymIdx(sym_idx, numSymPerMs) (((uint32_t)sym_idx == 0) ? (((uint32_t)numSymPerMs * MSEC_PER_SEC)) - 1) : (uint32_t)sym_idx-1)</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> uint64_t <a class="code" href="xran__timer_8h.html#a1d2f23e35725cd993cbb72de9f4f565a">xran_tick</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="xran__timer_8h.html#a2c22baf2fd259384ee376d438bb461c1">get_ticks_diff</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> curr_tick, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> last_tick);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="keywordtype">long</span> <a class="code" href="xran__timer_8h.html#a52ade7f1436323f071cf7151f7bdb097">poll_next_tick</a>(<span class="keywordtype">long</span> interval_ns, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *used_tick);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="keywordtype">long</span> <a class="code" href="xran__timer_8h.html#a63aaaffc2af6e6655ea0fc95078d5a04">sleep_next_tick</a>(<span class="keywordtype">long</span> interval);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keywordtype">int</span> <a class="code" href="xran__timer_8h.html#aeb3df12acecd320cd4939d4203dd9a99">timing_set_debug_stop</a>(<span class="keywordtype">int</span> value, <span class="keywordtype">int</span> count);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keywordtype">int</span> <a class="code" href="xran__timer_8h.html#ae12363837fbb4d5f1f7ce0485d443c77">timing_get_debug_stop</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">inline</span> uint64_t <a class="code" href="xran__timer_8h.html#abee5de4c0d88f6c17ce6b3962d097f07">timing_get_current_second</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">int</span> <a class="code" href="xran__timer_8h.html#a6c1790e87767257159038d0d98a393e6">timing_set_numerology</a>(uint8_t value);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="xran__timer_8h_html_a6c1790e87767257159038d0d98a393e6"><div class="ttname"><a href="xran__timer_8h.html#a6c1790e87767257159038d0d98a393e6">timing_set_numerology</a></div><div class="ttdeci">int timing_set_numerology(uint8_t value)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00093">xran_timer.c:93</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_ae12363837fbb4d5f1f7ce0485d443c77"><div class="ttname"><a href="xran__timer_8h.html#ae12363837fbb4d5f1f7ce0485d443c77">timing_get_debug_stop</a></div><div class="ttdeci">int timing_get_debug_stop(void)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00111">xran_timer.c:111</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_a1d2f23e35725cd993cbb72de9f4f565a"><div class="ttname"><a href="xran__timer_8h.html#a1d2f23e35725cd993cbb72de9f4f565a">xran_tick</a></div><div class="ttdeci">uint64_t xran_tick(void)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00131">xran_timer.c:131</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_a2c22baf2fd259384ee376d438bb461c1"><div class="ttname"><a href="xran__timer_8h.html#a2c22baf2fd259384ee376d438bb461c1">get_ticks_diff</a></div><div class="ttdeci">unsigned long get_ticks_diff(unsigned long curr_tick, unsigned long last_tick)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00138">xran_timer.c:138</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_a52ade7f1436323f071cf7151f7bdb097"><div class="ttname"><a href="xran__timer_8h.html#a52ade7f1436323f071cf7151f7bdb097">poll_next_tick</a></div><div class="ttdeci">long poll_next_tick(long interval_ns, unsigned long *used_tick)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00146">xran_timer.c:146</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_aeb3df12acecd320cd4939d4203dd9a99"><div class="ttname"><a href="xran__timer_8h.html#aeb3df12acecd320cd4939d4203dd9a99">timing_set_debug_stop</a></div><div class="ttdeci">int timing_set_debug_stop(int value, int count)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00099">xran_timer.c:99</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_abee5de4c0d88f6c17ce6b3962d097f07"><div class="ttname"><a href="xran__timer_8h.html#abee5de4c0d88f6c17ce6b3962d097f07">timing_get_current_second</a></div><div class="ttdeci">uint64_t timing_get_current_second(void)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00088">xran_timer.c:88</a></div></div>
+<div class="ttc" id="xran__timer_8h_html_a63aaaffc2af6e6655ea0fc95078d5a04"><div class="ttname"><a href="xran__timer_8h.html#a63aaaffc2af6e6655ea0fc95078d5a04">sleep_next_tick</a></div><div class="ttdeci">long sleep_next_tick(long interval)</div><div class="ttdef"><b>Definition:</b> <a href="xran__timer_8c_source.html#l00246">xran_timer.c:246</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by  <a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>