<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>PulseAudio: timeval.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.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 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> <h1>timeval.h</h1><a href="timeval_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef footimevalhfoo</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define footimevalhfoo</span> <a name="l00003"></a>00003 <span class="preprocessor"></span> <a name="l00004"></a>00004 <span class="comment">/***</span> <a name="l00005"></a>00005 <span class="comment"> This file is part of PulseAudio.</span> <a name="l00006"></a>00006 <span class="comment"></span> <a name="l00007"></a>00007 <span class="comment"> Copyright 2004-2006 Lennart Poettering</span> <a name="l00008"></a>00008 <span class="comment"> Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> PulseAudio is free software; you can redistribute it and/or modify</span> <a name="l00011"></a>00011 <span class="comment"> it under the terms of the GNU Lesser General Public License as</span> <a name="l00012"></a>00012 <span class="comment"> published by the Free Software Foundation; either version 2.1 of the</span> <a name="l00013"></a>00013 <span class="comment"> License, or (at your option) any later version.</span> <a name="l00014"></a>00014 <span class="comment"></span> <a name="l00015"></a>00015 <span class="comment"> PulseAudio is distributed in the hope that it will be useful, but</span> <a name="l00016"></a>00016 <span class="comment"> WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00017"></a>00017 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00018"></a>00018 <span class="comment"> Lesser General Public License for more details.</span> <a name="l00019"></a>00019 <span class="comment"></span> <a name="l00020"></a>00020 <span class="comment"> You should have received a copy of the GNU Lesser General Public</span> <a name="l00021"></a>00021 <span class="comment"> License along with PulseAudio; if not, write to the Free Software</span> <a name="l00022"></a>00022 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307</span> <a name="l00023"></a>00023 <span class="comment"> USA.</span> <a name="l00024"></a>00024 <span class="comment">***/</span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="preprocessor">#include <pulse/cdecl.h></span> <a name="l00027"></a>00027 <span class="preprocessor">#include <<a class="code" href="gccmacro_8h.html" title="GCC attribute macros.">pulse/gccmacro.h</a>></span> <a name="l00028"></a>00028 <span class="preprocessor">#include <<a class="code" href="sample_8h.html" title="Constants and routines for sample type handling.">pulse/sample.h</a>></span> <a name="l00029"></a>00029 <span class="preprocessor">#include <<a class="code" href="version_8h.html" title="Define header version.">pulse/version.h</a>></span> <a name="l00030"></a>00030 <a name="l00034"></a>00034 PA_C_DECL_BEGIN <a name="l00035"></a>00035 <a name="l00037"></a><a class="code" href="timeval_8h.html#dc226d28cef9e36fca56c355a03903f5">00037</a> <span class="preprocessor">#define PA_MSEC_PER_SEC ((pa_usec_t) 1000ULL)</span> <a name="l00038"></a>00038 <span class="preprocessor"></span> <a name="l00040"></a><a class="code" href="timeval_8h.html#65605026fb393422df650916ef7e3e32">00040</a> <span class="preprocessor">#define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL)</span> <a name="l00041"></a>00041 <span class="preprocessor"></span> <a name="l00043"></a><a class="code" href="timeval_8h.html#98cd21cdaba8d04b078ad3f4e8139a11">00043</a> <span class="preprocessor">#define PA_NSEC_PER_SEC ((pa_usec_t) 1000000000ULL)</span> <a name="l00044"></a>00044 <span class="preprocessor"></span> <a name="l00046"></a><a class="code" href="timeval_8h.html#13ded4b857d4148545f7e59022700a95">00046</a> <span class="preprocessor">#define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL)</span> <a name="l00047"></a>00047 <span class="preprocessor"></span> <a name="l00049"></a><a class="code" href="timeval_8h.html#addb92588f282c06ac13d3d9530ff604">00049</a> <span class="preprocessor">#define PA_NSEC_PER_MSEC ((pa_usec_t) 1000000ULL)</span> <a name="l00050"></a>00050 <span class="preprocessor"></span> <a name="l00052"></a><a class="code" href="timeval_8h.html#cfb6c27ac89618aa980b30f2724263ac">00052</a> <span class="preprocessor">#define PA_NSEC_PER_USEC ((pa_usec_t) 1000ULL)</span> <a name="l00053"></a>00053 <span class="preprocessor"></span> <a name="l00054"></a>00054 <span class="keyword">struct </span>timeval; <a name="l00055"></a>00055 <a name="l00057"></a>00057 <span class="keyword">struct </span>timeval *<a class="code" href="timeval_8h.html#6b172af60031b694582956e8b4ed6785" title="Return the current timestamp, just like UNIX gettimeofday().">pa_gettimeofday</a>(<span class="keyword">struct</span> timeval *tv); <a name="l00058"></a>00058 <a name="l00061"></a>00061 <a class="code" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> <a class="code" href="timeval_8h.html#30ef3f1f4aa7a57fe6fcf6b217725161" 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#a1c5f50faa1073e28ba469b86f6a0548" title="This function&#39;s return value depends only the arguments list and global state...">PA_GCC_PURE</a>; <a name="l00062"></a>00062 <a name="l00064"></a>00064 <span class="keywordtype">int</span> <a class="code" href="timeval_8h.html#dda5cdd65f7d07a457849d230c8ed066" title="Compare the two timeval structs and return 0 when equal, negative when a &lt; b,...">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#a1c5f50faa1073e28ba469b86f6a0548" title="This function&#39;s return value depends only the arguments list and global state...">PA_GCC_PURE</a>; <a name="l00065"></a>00065 <a name="l00067"></a>00067 <a class="code" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> <a class="code" href="timeval_8h.html#8d9a66f93e843d5e777eae6363b3aafc" 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); <a name="l00068"></a>00068 <a name="l00070"></a>00070 <span class="keyword">struct </span>timeval* <a class="code" href="timeval_8h.html#43743ff9b5891b03b8b83091b89d0fbe" title="Add the specified time inmicroseconds to the specified timeval structure.">pa_timeval_add</a>(<span class="keyword">struct</span> timeval *tv, <a class="code" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> v); <a name="l00071"></a>00071 <a name="l00073"></a>00073 <span class="keyword">struct </span>timeval* <a class="code" href="timeval_8h.html#ef2c91e9cc3f5e819e94b0b47eec008d" title="Subtract the specified time inmicroseconds to the specified timeval structure.">pa_timeval_sub</a>(<span class="keyword">struct</span> timeval *tv, <a class="code" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> v); <a name="l00074"></a>00074 <a name="l00076"></a>00076 <span class="keyword">struct </span>timeval* <a class="code" href="timeval_8h.html#f57d5b7c72056fb96737394952f13ba1" title="Store the specified uec value in the timeval struct.">pa_timeval_store</a>(<span class="keyword">struct</span> timeval *tv, <a class="code" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> v); <a name="l00077"></a>00077 <a name="l00079"></a>00079 <a class="code" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89" title="Type for usec specifications (unsigned).">pa_usec_t</a> <a class="code" href="timeval_8h.html#4ad23ae783a93d0da964b2e026f54dc2" 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); <a name="l00080"></a>00080 <a name="l00081"></a>00081 PA_C_DECL_END <a name="l00082"></a>00082 <a name="l00083"></a>00083 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 2 04:18:19 2009 for PulseAudio by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>