<!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>Apache Portable Runtime: Time Routines</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.9.1 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <h1>Time Routines<br> <small> [<a class="el" href="group__APR.html">Apache Portability Runtime library</a>]</small> </h1><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga18">APR_TIME_C</a>(val) APR_INT64_C(val)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga19">APR_TIME_T_FMT</a> APR_INT64_T_FMT</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga20">APR_USEC_PER_SEC</a> APR_TIME_C(1000000)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga21">apr_time_sec</a>(time) ((time) / APR_USEC_PER_SEC)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga22">apr_time_usec</a>(time) ((time) % APR_USEC_PER_SEC)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga23">apr_time_msec</a>(time) (((time) / 1000) % 1000)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga24">apr_time_as_msec</a>(time) ((time) / 1000)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga25">apr_time_from_sec</a>(sec) ((<a class="el" href="group__apr__time.html#ga2">apr_time_t</a>)(sec) * APR_USEC_PER_SEC)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga26">apr_time_make</a>(sec, usec)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga27">APR_RFC822_DATE_LEN</a> (30)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga28">APR_CTIME_LEN</a> (25)</td></tr> <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef apr_int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga2">apr_time_t</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef apr_int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga3">apr_interval_time_t</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef apr_int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga4">apr_short_interval_time_t</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga5">apr_time_exp_t</a></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga6">apr_time_now</a> (void)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga7">apr_time_ansi_put</a> (<a class="el" href="group__apr__time.html#ga2">apr_time_t</a> *result, time_t input)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga8">apr_time_exp_tz</a> (<a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> *result, <a class="el" href="group__apr__time.html#ga2">apr_time_t</a> input, apr_int32_t offs)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga9">apr_time_exp_gmt</a> (<a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> *result, <a class="el" href="group__apr__time.html#ga2">apr_time_t</a> input)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga10">apr_time_exp_lt</a> (<a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> *result, <a class="el" href="group__apr__time.html#ga2">apr_time_t</a> input)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga11">apr_time_exp_get</a> (<a class="el" href="group__apr__time.html#ga2">apr_time_t</a> *result, <a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> *input)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga12">apr_time_exp_gmt_get</a> (<a class="el" href="group__apr__time.html#ga2">apr_time_t</a> *result, <a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> *input)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga13">apr_sleep</a> (<a class="el" href="group__apr__time.html#ga3">apr_interval_time_t</a> t)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga14">apr_rfc822_date</a> (char *date_str, <a class="el" href="group__apr__time.html#ga2">apr_time_t</a> t)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga15">apr_ctime</a> (char *date_str, <a class="el" href="group__apr__time.html#ga2">apr_time_t</a> t)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga16">apr_strftime</a> (char *s, apr_size_t *retsize, apr_size_t max, const char *format, <a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> *tm)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga17">apr_time_clock_hires</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p)</td></tr> <tr><td colspan="2"><br><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga0">apr_month_snames</a> [12][4]</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__time.html#ga1">apr_day_snames</a> [7][4]</td></tr> </table> <hr><h2>Define Documentation</h2> <a class="anchor" name="ga28" doxytag="apr_time.h::APR_CTIME_LEN"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define APR_CTIME_LEN (25) </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> length of a CTIME date </td> </tr> </table> <a class="anchor" name="ga27" doxytag="apr_time.h::APR_RFC822_DATE_LEN"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define APR_RFC822_DATE_LEN (30) </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> length of a RFC822 Date </td> </tr> </table> <a class="anchor" name="ga24" doxytag="apr_time.h::apr_time_as_msec"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define apr_time_as_msec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">time </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> ((time) / 1000)</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>Returns:</b></dt><dd>apr_time_t as a msec </dd></dl> </td> </tr> </table> <a class="anchor" name="ga18" doxytag="apr_time.h::APR_TIME_C"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define APR_TIME_C </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">val </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> APR_INT64_C(val)</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> mechanism to properly type apr_time_t literals </td> </tr> </table> <a class="anchor" name="ga25" doxytag="apr_time.h::apr_time_from_sec"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define apr_time_from_sec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">sec </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> ((<a class="el" href="group__apr__time.html#ga2">apr_time_t</a>)(sec) * APR_USEC_PER_SEC)</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>Returns:</b></dt><dd>a second as an apr_time_t </dd></dl> </td> </tr> </table> <a class="anchor" name="ga26" doxytag="apr_time.h::apr_time_make"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define apr_time_make </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">sec, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>usec </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <b>Value:</b><div class="fragment"><pre class="fragment">((apr_time_t)(sec) * <a class="code" href="group__apr__time.html#ga20">APR_USEC_PER_SEC</a> \ + (apr_time_t)(usec)) </pre></div><dl compact><dt><b>Returns:</b></dt><dd>a second and usec combination as an apr_time_t </dd></dl> </td> </tr> </table> <a class="anchor" name="ga23" doxytag="apr_time.h::apr_time_msec"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define apr_time_msec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">time </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> (((time) / 1000) % 1000)</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>Returns:</b></dt><dd>apr_time_t as a msec </dd></dl> </td> </tr> </table> <a class="anchor" name="ga21" doxytag="apr_time.h::apr_time_sec"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define apr_time_sec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">time </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> ((time) / APR_USEC_PER_SEC)</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>Returns:</b></dt><dd>apr_time_t as a second </dd></dl> </td> </tr> </table> <a class="anchor" name="ga19" doxytag="apr_time.h::APR_TIME_T_FMT"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define APR_TIME_T_FMT APR_INT64_T_FMT </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> mechanism to properly print apr_time_t values </td> </tr> </table> <a class="anchor" name="ga22" doxytag="apr_time.h::apr_time_usec"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define apr_time_usec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">time </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> ((time) % APR_USEC_PER_SEC)</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>Returns:</b></dt><dd>apr_time_t as a usec </dd></dl> </td> </tr> </table> <a class="anchor" name="ga20" doxytag="apr_time.h::APR_USEC_PER_SEC"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define APR_USEC_PER_SEC APR_TIME_C(1000000) </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> number of microseconds per second </td> </tr> </table> <hr><h2>Typedef Documentation</h2> <a class="anchor" name="ga3" doxytag="apr_time.h::apr_interval_time_t"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">typedef apr_int64_t <a class="el" href="group__apr__time.html#ga3">apr_interval_time_t</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> intervals for I/O timeouts, in microseconds </td> </tr> </table> <a class="anchor" name="ga4" doxytag="apr_time.h::apr_short_interval_time_t"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">typedef apr_int32_t <a class="el" href="group__apr__time.html#ga4">apr_short_interval_time_t</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> short interval for I/O timeouts, in microseconds </td> </tr> </table> <a class="anchor" name="ga5" doxytag="apr_time.h::apr_time_exp_t"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">typedef struct <a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> <a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> </dd></dl> </td> </tr> </table> <a class="anchor" name="ga2" doxytag="apr_time.h::apr_time_t"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">typedef apr_int64_t <a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> number of microseconds since 00:00:00 january 1, 1970 UTC </td> </tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="ga15" doxytag="apr_time.h::apr_ctime"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_ctime </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>date_str</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td> <td class="mdname" nowrap> <em>t</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> apr_ctime formats dates in the ctime() format in an efficient manner. it is a fixed length format and requires the indicated amount of storage including the trailing NUL terminator. Unlike ANSI/ISO C ctime(), <a class="el" href="group__apr__time.html#ga15">apr_ctime()</a> does not include a <br> at the end of the string. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date_str</em> </td><td>String to write to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>t</em> </td><td>the time to convert </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga14" doxytag="apr_time.h::apr_rfc822_date"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_rfc822_date </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>date_str</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td> <td class="mdname" nowrap> <em>t</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> apr_rfc822_date formats dates in the RFC822 format in an efficient manner. It is a fixed length format which requires the indicated amount of storage, including the trailing NUL terminator. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date_str</em> </td><td>String to write to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>t</em> </td><td>the time to convert </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga13" doxytag="apr_time.h::apr_sleep"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void apr_sleep </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__apr__time.html#ga3">apr_interval_time_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>t</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Sleep for the specified number of micro-seconds. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>t</em> </td><td>desired amount of time to sleep. </td></tr> </table> </dl> <dl compact><dt><b>Warning:</b></dt><dd>May sleep for longer than the specified time. </dd></dl> </td> </tr> </table> <a class="anchor" name="ga16" doxytag="apr_time.h::apr_strftime"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_strftime </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>s</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>apr_size_t * </td> <td class="mdname" nowrap> <em>retsize</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>apr_size_t </td> <td class="mdname" nowrap> <em>max</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>format</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> * </td> <td class="mdname" nowrap> <em>tm</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> formats the exploded time according to the format specified <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>string to write to </td></tr> <tr><td valign="top"></td><td valign="top"><em>retsize</em> </td><td>The length of the returned string </td></tr> <tr><td valign="top"></td><td valign="top"><em>max</em> </td><td>The maximum length of the string </td></tr> <tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>The format for the time string </td></tr> <tr><td valign="top"></td><td valign="top"><em>tm</em> </td><td>The time to convert </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga7" doxytag="apr_time.h::apr_time_ansi_put"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_time_ansi_put </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> * </td> <td class="mdname" nowrap> <em>result</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>time_t </td> <td class="mdname" nowrap> <em>input</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> convert an ansi time_t to an apr_time_t <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>the resulting apr_time_t </td></tr> <tr><td valign="top"></td><td valign="top"><em>input</em> </td><td>the time_t to convert </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga17" doxytag="apr_time.h::apr_time_clock_hires"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void apr_time_clock_hires </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td> <td class="mdname1" valign="top" nowrap> <em>p</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Improve the clock resolution for the lifetime of the given pool. Generally this is only desireable on benchmarking and other very time-sensitive applications, and has no impact on most platforms. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>The pool to associate the finer clock resolution </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga11" doxytag="apr_time.h::apr_time_exp_get"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_time_exp_get </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> * </td> <td class="mdname" nowrap> <em>result</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> * </td> <td class="mdname" nowrap> <em>input</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Convert time value from human readable format to a numeric apr_time_t e.g. elapsed usec since epoch <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>the resulting imploded time </td></tr> <tr><td valign="top"></td><td valign="top"><em>input</em> </td><td>the input exploded time </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga9" doxytag="apr_time.h::apr_time_exp_gmt"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_time_exp_gmt </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> * </td> <td class="mdname" nowrap> <em>result</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td> <td class="mdname" nowrap> <em>input</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> convert a time to its human readable components in GMT timezone <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>the exploded time </td></tr> <tr><td valign="top"></td><td valign="top"><em>input</em> </td><td>the time to explode </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga12" doxytag="apr_time.h::apr_time_exp_gmt_get"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_time_exp_gmt_get </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> * </td> <td class="mdname" nowrap> <em>result</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> * </td> <td class="mdname" nowrap> <em>input</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Convert time value from human readable format to a numeric apr_time_t that always represents GMT <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>the resulting imploded time </td></tr> <tr><td valign="top"></td><td valign="top"><em>input</em> </td><td>the input exploded time </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga10" doxytag="apr_time.h::apr_time_exp_lt"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_time_exp_lt </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> * </td> <td class="mdname" nowrap> <em>result</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td> <td class="mdname" nowrap> <em>input</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> convert a time to its human readable components in local timezone <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>the exploded time </td></tr> <tr><td valign="top"></td><td valign="top"><em>input</em> </td><td>the time to explode </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga8" doxytag="apr_time.h::apr_time_exp_tz"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_time_exp_tz </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structapr__time__exp__t.html">apr_time_exp_t</a> * </td> <td class="mdname" nowrap> <em>result</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> </td> <td class="mdname" nowrap> <em>input</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>apr_int32_t </td> <td class="mdname" nowrap> <em>offs</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> convert a time to its human readable components using an offset from GMT <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>the exploded time </td></tr> <tr><td valign="top"></td><td valign="top"><em>input</em> </td><td>the time to explode </td></tr> <tr><td valign="top"></td><td valign="top"><em>offs</em> </td><td>the number of seconds offset to apply </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="ga6" doxytag="apr_time.h::apr_time_now"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__apr__time.html#ga2">apr_time_t</a> apr_time_now </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <dl compact><dt><b>Returns:</b></dt><dd>the current time </dd></dl> </td> </tr> </table> <hr><h2>Variable Documentation</h2> <a class="anchor" name="ga1" doxytag="apr_time.h::apr_day_snames"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const char <a class="el" href="group__apr__time.html#ga1">apr_day_snames</a>[7][4] </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> day names </td> </tr> </table> <a class="anchor" name="ga0" doxytag="apr_time.h::apr_month_snames"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const char <a class="el" href="group__apr__time.html#ga0">apr_month_snames</a>[12][4] </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> month names </td> </tr> </table> <hr size="1"><address style="align: right;"><small>Generated on Sun Mar 20 19:52:28 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address> </body> </html>