<!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.3"/> <title>PulseAudio: timeval.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="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </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 style="padding-left: 0.5em;"> <div id="projectname">PulseAudio  <span id="projectnumber">2.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.3 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('timeval_8h_source.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">timeval.h</div> </div> </div><!--header--> <div class="contents"> <a href="timeval_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="preprocessor">#ifndef footimevalhfoo</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor"></span><span class="preprocessor">#define footimevalhfoo</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor"></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"> This file is part of PulseAudio.</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"></span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> Copyright 2004-2006 Lennart Poettering</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> PulseAudio is free software; you can redistribute it and/or modify</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> it under the terms of the GNU Lesser General Public License as</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> published by the Free Software Foundation; either version 2.1 of the</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> License, or (at your option) any later version.</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"></span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> PulseAudio is distributed in the hope that it will be useful, but</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> WITHOUT ANY WARRANTY; without even the implied warranty of</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> Lesser General Public License for more details.</span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"></span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> You should have received a copy of the GNU Lesser General Public</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> License along with PulseAudio; if not, write to the Free Software</span></div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> USA.</span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment">***/</span></div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <pulse/cdecl.h></span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="gccmacro_8h.html" title="GCC attribute macros.">pulse/gccmacro.h</a>></span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="sample_8h.html" title="Constants and routines for sample type handling.">pulse/sample.h</a>></span></div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="code" href="version_8h.html" title="Define header version.">pulse/version.h</a>></span></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> PA_C_DECL_BEGIN</div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div> <div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="timeval_8h.html#adc226d28cef9e36fca56c355a03903f5"> 37</a></span> <span class="preprocessor">#define PA_MSEC_PER_SEC ((pa_usec_t) 1000ULL)</span></div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00040"></a><span class="lineno"><a class="code" href="timeval_8h.html#a65605026fb393422df650916ef7e3e32"> 40</a></span> <span class="preprocessor">#define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL)</span></div> <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00043"></a><span class="lineno"><a class="code" href="timeval_8h.html#a98cd21cdaba8d04b078ad3f4e8139a11"> 43</a></span> <span class="preprocessor">#define PA_NSEC_PER_SEC ((unsigned long long) 1000000000ULL)</span></div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00046"></a><span class="lineno"><a class="code" href="timeval_8h.html#a13ded4b857d4148545f7e59022700a95"> 46</a></span> <span class="preprocessor">#define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL)</span></div> <div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00049"></a><span class="lineno"><a class="code" href="timeval_8h.html#aaddb92588f282c06ac13d3d9530ff604"> 49</a></span> <span class="preprocessor">#define PA_NSEC_PER_MSEC ((unsigned long long) 1000000ULL)</span></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00052"></a><span class="lineno"><a class="code" href="timeval_8h.html#acfb6c27ac89618aa980b30f2724263ac"> 52</a></span> <span class="preprocessor">#define PA_NSEC_PER_USEC ((unsigned long long) 1000ULL)</span></div> <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="timeval_8h.html#af0ac47427f9d7fa796ab9bdaa96db1ca"> 55</a></span> <span class="preprocessor">#define PA_USEC_INVALID ((pa_usec_t) -1)</span></div> <div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00058"></a><span class="lineno"><a class="code" href="timeval_8h.html#ad127de6077e6f8a0288099368fb91762"> 58</a></span> <span class="preprocessor">#define PA_USEC_MAX ((pa_usec_t) -2)</span></div> <div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">struct </span>timeval;</div> <div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div> <div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">struct </span>timeval *<a class="code" href="timeval_8h.html#a6b172af60031b694582956e8b4ed6785" title="Return the current wallclock timestamp, just like UNIX gettimeofday().">pa_gettimeofday</a>(<span class="keyword">struct</span> timeval *tv);</div> <div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div> <div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <a class="code" href="sample_8h.html#a885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> <a class="code" href="timeval_8h.html#a30ef3f1f4aa7a57fe6fcf6b217725161" title="Calculate the difference between the two specified timeval structs.">pa_timeval_diff</a>(<span class="keyword">const</span> <span class="keyword">struct</span> timeval *a, <span class="keyword">const</span> <span class="keyword">struct</span> timeval *b) <a class="code" href="gccmacro_8h.html#aa1c5f50faa1073e28ba469b86f6a0548" title="This function's return value depends only the arguments list and global state.">PA_GCC_PURE</a>;</div> <div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div> <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">int</span> <a class="code" href="timeval_8h.html#adda5cdd65f7d07a457849d230c8ed066" title="Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwise...">pa_timeval_cmp</a>(<span class="keyword">const</span> <span class="keyword">struct</span> timeval *a, <span class="keyword">const</span> <span class="keyword">struct</span> timeval *b) <a class="code" href="gccmacro_8h.html#aa1c5f50faa1073e28ba469b86f6a0548" title="This function's return value depends only the arguments list and global state.">PA_GCC_PURE</a>;</div> <div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div> <div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <a class="code" href="sample_8h.html#a885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> <a class="code" href="timeval_8h.html#a8d9a66f93e843d5e777eae6363b3aafc" title="Return the time difference between now and the specified timestamp.">pa_timeval_age</a>(<span class="keyword">const</span> <span class="keyword">struct</span> timeval *tv);</div> <div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div> <div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">struct </span>timeval* <a class="code" href="timeval_8h.html#a43743ff9b5891b03b8b83091b89d0fbe" title="Add the specified time in microseconds to the specified timeval structure.">pa_timeval_add</a>(<span class="keyword">struct</span> timeval *tv, <a class="code" href="sample_8h.html#a885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> v);</div> <div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div> <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">struct </span>timeval* <a class="code" href="timeval_8h.html#aef2c91e9cc3f5e819e94b0b47eec008d" title="Subtract the specified time in microseconds to the specified timeval structure.">pa_timeval_sub</a>(<span class="keyword">struct</span> timeval *tv, <a class="code" href="sample_8h.html#a885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> v);</div> <div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div> <div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">struct </span>timeval* <a class="code" href="timeval_8h.html#af57d5b7c72056fb96737394952f13ba1" title="Store the specified usec value in the timeval struct.">pa_timeval_store</a>(<span class="keyword">struct</span> timeval *tv, <a class="code" href="sample_8h.html#a885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> v);</div> <div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div> <div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <a class="code" href="sample_8h.html#a885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> <a class="code" href="timeval_8h.html#a4ad23ae783a93d0da964b2e026f54dc2" title="Load the specified tv value and return it in usec.">pa_timeval_load</a>(<span class="keyword">const</span> <span class="keyword">struct</span> timeval *tv);</div> <div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div> <div class="line"><a name="l00087"></a><span class="lineno"> 87</span> PA_C_DECL_END</div> <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div> <div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="preprocessor">#endif</span></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_ec5b0a79aff2db41fe5d1b9326f09c28.html">pulse</a></li><li class="navelem"><a class="el" href="timeval_8h.html">timeval.h</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3 </li> </ul> </div> </body> </html>