Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > bdbf07027827e6ad7d9208f8a9eaea97 > files > 71

apr-docs-1.2.7-11.el5_6.5.x86_64.rpm

<!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: apr_time.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</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&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>apr_time.h</h1><a href="apr__time_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span>
<a name="l00002"></a>00002 <span class="comment"> * applicable.</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
<a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
<a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef APR_TIME_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_TIME_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">/**</span>
<a name="l00021"></a>00021 <span class="comment"> * @file apr_time.h</span>
<a name="l00022"></a>00022 <span class="comment"> * @brief APR Time Library</span>
<a name="l00023"></a>00023 <span class="comment"> */</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="apr_8h.html">apr.h</a>"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00031"></a>00031 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00032"></a>00032 <span class="comment"></span>
<a name="l00033"></a>00033 <span class="comment">/**</span>
<a name="l00034"></a>00034 <span class="comment"> * @defgroup apr_time Time Routines</span>
<a name="l00035"></a>00035 <span class="comment"> * @ingroup APR </span>
<a name="l00036"></a>00036 <span class="comment"> * @{</span>
<a name="l00037"></a>00037 <span class="comment"> */</span>
<a name="l00038"></a>00038 <span class="comment"></span>
<a name="l00039"></a>00039 <span class="comment">/** month names */</span>
<a name="l00040"></a>00040 <a class="code" href="group__apr__platform.html#g69e3caf825de3c1cc90888f74f8f5f8f">APR_DECLARE_DATA</a> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="group__apr__time.html#g32b5a3c4f5adfa9c77467050a44dff5c">apr_month_snames</a>[12][4];<span class="comment"></span>
<a name="l00041"></a>00041 <span class="comment">/** day names */</span>
<a name="l00042"></a>00042 <a class="code" href="group__apr__platform.html#g69e3caf825de3c1cc90888f74f8f5f8f">APR_DECLARE_DATA</a> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> <a class="code" href="group__apr__time.html#g3f0b18624455c805ab2e79ff3ebaf0f6">apr_day_snames</a>[7][4];
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="comment"></span>
<a name="l00045"></a>00045 <span class="comment">/** number of microseconds since 00:00:00 january 1, 1970 UTC */</span>
<a name="l00046"></a><a class="code" href="group__apr__time.html#gedd0f998e5cde878c0fefa41a1ee94bd">00046</a> <span class="keyword">typedef</span> apr_int64_t <a class="code" href="group__apr__time.html#gedd0f998e5cde878c0fefa41a1ee94bd">apr_time_t</a>;
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 <span class="comment"></span>
<a name="l00049"></a>00049 <span class="comment">/** mechanism to properly type apr_time_t literals */</span>
<a name="l00050"></a><a class="code" href="group__apr__time.html#g3000f49dc70db4f396faaeac1ca74a44">00050</a> <span class="preprocessor">#define APR_TIME_C(val) APR_INT64_C(val)</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00052"></a>00052 <span class="comment">/** mechanism to properly print apr_time_t values */</span>
<a name="l00053"></a><a class="code" href="group__apr__time.html#g4d3867daa0204cf3fc8c1ca3d963941a">00053</a> <span class="preprocessor">#define APR_TIME_T_FMT APR_INT64_T_FMT</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">/** intervals for I/O timeouts, in microseconds */</span>
<a name="l00056"></a><a class="code" href="group__apr__time.html#g4867ccc083452a265915ac7dfafde457">00056</a> <span class="keyword">typedef</span> apr_int64_t <a class="code" href="group__apr__time.html#g4867ccc083452a265915ac7dfafde457">apr_interval_time_t</a>;<span class="comment"></span>
<a name="l00057"></a>00057 <span class="comment">/** short interval for I/O timeouts, in microseconds */</span>
<a name="l00058"></a><a class="code" href="group__apr__time.html#g0b43235ea117755966cb116f5df4b986">00058</a> <span class="keyword">typedef</span> apr_int32_t <a class="code" href="group__apr__time.html#g0b43235ea117755966cb116f5df4b986">apr_short_interval_time_t</a>;
<a name="l00059"></a>00059 <span class="comment"></span>
<a name="l00060"></a>00060 <span class="comment">/** number of microseconds per second */</span>
<a name="l00061"></a><a class="code" href="group__apr__time.html#gcd6af7eef98ec34928d82608599be07f">00061</a> <span class="preprocessor">#define APR_USEC_PER_SEC APR_TIME_C(1000000)</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00063"></a>00063 <span class="comment">/** @return apr_time_t as a second */</span>
<a name="l00064"></a><a class="code" href="group__apr__time.html#gb03f4103c055e6828f86e42bee6f5c2b">00064</a> <span class="preprocessor">#define apr_time_sec(time) ((time) / APR_USEC_PER_SEC)</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00066"></a>00066 <span class="comment">/** @return apr_time_t as a usec */</span>
<a name="l00067"></a><a class="code" href="group__apr__time.html#g3108bea70fc6cde84592d296610e8a4e">00067</a> <span class="preprocessor">#define apr_time_usec(time) ((time) % APR_USEC_PER_SEC)</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00069"></a>00069 <span class="comment">/** @return apr_time_t as a msec */</span>
<a name="l00070"></a><a class="code" href="group__apr__time.html#g33af102aa89f609083f671396edfedd0">00070</a> <span class="preprocessor">#define apr_time_msec(time) (((time) / 1000) % 1000)</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">/** @return apr_time_t as a msec */</span>
<a name="l00073"></a><a class="code" href="group__apr__time.html#g1b141f2cc5393da17437445b0905fdd3">00073</a> <span class="preprocessor">#define apr_time_as_msec(time) ((time) / 1000)</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00075"></a>00075 <span class="comment">/** @return a second as an apr_time_t */</span>
<a name="l00076"></a><a class="code" href="group__apr__time.html#ge1e2bb134e72a3003d7116eb3b8d9fa6">00076</a> <span class="preprocessor">#define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00078"></a>00078 <span class="comment">/** @return a second and usec combination as an apr_time_t */</span>
<a name="l00079"></a><a class="code" href="group__apr__time.html#g524c11d82b2f2028e4fc5f5230f4676e">00079</a> <span class="preprocessor">#define apr_time_make(sec, usec) ((apr_time_t)(sec) * APR_USEC_PER_SEC \</span>
<a name="l00080"></a>00080 <span class="preprocessor">                                + (apr_time_t)(usec))</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00082"></a>00082 <span class="comment">/**</span>
<a name="l00083"></a>00083 <span class="comment"> * @return the current time</span>
<a name="l00084"></a>00084 <span class="comment"> */</span>
<a name="l00085"></a>00085 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(apr_time_t) <a class="code" href="group__apr__time.html#g8610b84ed493343c2c4431efd73fd1ac">apr_time_now</a>(<span class="keywordtype">void</span>);
<a name="l00086"></a>00086 <span class="comment"></span>
<a name="l00087"></a>00087 <span class="comment">/** @see apr_time_exp_t */</span>
<a name="l00088"></a><a class="code" href="group__apr__time.html#gf035f71e7d7512b24ade8a84b90f9472">00088</a> typedef struct <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a>;
<a name="l00089"></a>00089 <span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">/**</span>
<a name="l00091"></a>00091 <span class="comment"> * a structure similar to ANSI struct tm with the following differences:</span>
<a name="l00092"></a>00092 <span class="comment"> *  - tm_usec isn't an ANSI field</span>
<a name="l00093"></a>00093 <span class="comment"> *  - tm_gmtoff isn't an ANSI field (it's a bsdism)</span>
<a name="l00094"></a>00094 <span class="comment"> */</span>
<a name="l00095"></a><a class="code" href="structapr__time__exp__t.html">00095</a> struct apr_time_exp_t {<span class="comment"></span>
<a name="l00096"></a>00096 <span class="comment">    /** microseconds past tm_sec */</span>
<a name="l00097"></a><a class="code" href="structapr__time__exp__t.html#df018fefd1d896bc2e25a27b91195c58">00097</a>     apr_int32_t tm_usec;<span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">    /** (0-61) seconds past tm_min */</span>
<a name="l00099"></a><a class="code" href="structapr__time__exp__t.html#d78db9ec9d75599baabf63599eba2371">00099</a>     apr_int32_t tm_sec;<span class="comment"></span>
<a name="l00100"></a>00100 <span class="comment">    /** (0-59) minutes past tm_hour */</span>
<a name="l00101"></a><a class="code" href="structapr__time__exp__t.html#66e01cec05ddf242ff9ff10cd8f0e9fc">00101</a>     apr_int32_t tm_min;<span class="comment"></span>
<a name="l00102"></a>00102 <span class="comment">    /** (0-23) hours past midnight */</span>
<a name="l00103"></a><a class="code" href="structapr__time__exp__t.html#81cf9ccbefce593d0d1067e6e1f8c963">00103</a>     apr_int32_t tm_hour;<span class="comment"></span>
<a name="l00104"></a>00104 <span class="comment">    /** (1-31) day of the month */</span>
<a name="l00105"></a><a class="code" href="structapr__time__exp__t.html#6f6675f4f9064205dec1e9532d8fe2cc">00105</a>     apr_int32_t tm_mday;<span class="comment"></span>
<a name="l00106"></a>00106 <span class="comment">    /** (0-11) month of the year */</span>
<a name="l00107"></a><a class="code" href="structapr__time__exp__t.html#1ccb2d891c429487c1fc84406fb984bc">00107</a>     apr_int32_t tm_mon;<span class="comment"></span>
<a name="l00108"></a>00108 <span class="comment">    /** year since 1900 */</span>
<a name="l00109"></a><a class="code" href="structapr__time__exp__t.html#8f0ab4efed87000bbe9f0fda0330bb73">00109</a>     apr_int32_t tm_year;<span class="comment"></span>
<a name="l00110"></a>00110 <span class="comment">    /** (0-6) days since sunday */</span>
<a name="l00111"></a><a class="code" href="structapr__time__exp__t.html#49dc5ddff3c5b6fbc396aaaa43bb3828">00111</a>     apr_int32_t tm_wday;<span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">    /** (0-365) days since jan 1 */</span>
<a name="l00113"></a><a class="code" href="structapr__time__exp__t.html#2442d9d4365319fac00d13b5ce5f8c3c">00113</a>     apr_int32_t tm_yday;<span class="comment"></span>
<a name="l00114"></a>00114 <span class="comment">    /** daylight saving time */</span>
<a name="l00115"></a><a class="code" href="structapr__time__exp__t.html#0f3332a3a55d0cb66d5fefa85b49dba4">00115</a>     apr_int32_t tm_isdst;<span class="comment"></span>
<a name="l00116"></a>00116 <span class="comment">    /** seconds east of UTC */</span>
<a name="l00117"></a><a class="code" href="structapr__time__exp__t.html#a8693d358e62ecf2241ee2259af719ce">00117</a>     apr_int32_t tm_gmtoff;
<a name="l00118"></a>00118 };
<a name="l00119"></a>00119 <span class="comment"></span>
<a name="l00120"></a>00120 <span class="comment">/**</span>
<a name="l00121"></a>00121 <span class="comment"> * convert an ansi time_t to an apr_time_t</span>
<a name="l00122"></a>00122 <span class="comment"> * @param result the resulting apr_time_t</span>
<a name="l00123"></a>00123 <span class="comment"> * @param input the time_t to convert</span>
<a name="l00124"></a>00124 <span class="comment"> */</span>
<a name="l00125"></a>00125 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#gc65e2e5b4779deaf3d70e90dc227d0ef">apr_time_ansi_put</a>(apr_time_t *result, 
<a name="l00126"></a>00126                                                     time_t input);
<a name="l00127"></a>00127 <span class="comment"></span>
<a name="l00128"></a>00128 <span class="comment">/**</span>
<a name="l00129"></a>00129 <span class="comment"> * convert a time to its human readable components using an offset</span>
<a name="l00130"></a>00130 <span class="comment"> * from GMT</span>
<a name="l00131"></a>00131 <span class="comment"> * @param result the exploded time</span>
<a name="l00132"></a>00132 <span class="comment"> * @param input the time to explode</span>
<a name="l00133"></a>00133 <span class="comment"> * @param offs the number of seconds offset to apply</span>
<a name="l00134"></a>00134 <span class="comment"> */</span>
<a name="l00135"></a>00135 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#g2235f3220cef0a5e112c3963882ede7b">apr_time_exp_tz</a>(<a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *result,
<a name="l00136"></a>00136                                           apr_time_t input,
<a name="l00137"></a>00137                                           apr_int32_t offs);
<a name="l00138"></a>00138 <span class="comment"></span>
<a name="l00139"></a>00139 <span class="comment">/**</span>
<a name="l00140"></a>00140 <span class="comment"> * convert a time to its human readable components in GMT timezone</span>
<a name="l00141"></a>00141 <span class="comment"> * @param result the exploded time</span>
<a name="l00142"></a>00142 <span class="comment"> * @param input the time to explode</span>
<a name="l00143"></a>00143 <span class="comment"> */</span>
<a name="l00144"></a>00144 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#g9be340eaa9e35fdae61afe65e007b569">apr_time_exp_gmt</a>(<a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *result, 
<a name="l00145"></a>00145                                            apr_time_t input);
<a name="l00146"></a>00146 <span class="comment"></span>
<a name="l00147"></a>00147 <span class="comment">/**</span>
<a name="l00148"></a>00148 <span class="comment"> * convert a time to its human readable components in local timezone</span>
<a name="l00149"></a>00149 <span class="comment"> * @param result the exploded time</span>
<a name="l00150"></a>00150 <span class="comment"> * @param input the time to explode</span>
<a name="l00151"></a>00151 <span class="comment"> */</span>
<a name="l00152"></a>00152 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#gf5029e5b98c966da5414c249fd075cf1">apr_time_exp_lt</a>(<a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *result, 
<a name="l00153"></a>00153                                           apr_time_t input);
<a name="l00154"></a>00154 <span class="comment"></span>
<a name="l00155"></a>00155 <span class="comment">/**</span>
<a name="l00156"></a>00156 <span class="comment"> * Convert time value from human readable format to a numeric apr_time_t </span>
<a name="l00157"></a>00157 <span class="comment"> * e.g. elapsed usec since epoch</span>
<a name="l00158"></a>00158 <span class="comment"> * @param result the resulting imploded time</span>
<a name="l00159"></a>00159 <span class="comment"> * @param input the input exploded time</span>
<a name="l00160"></a>00160 <span class="comment"> */</span>
<a name="l00161"></a>00161 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#gb91efe4d4d6a2fe5d93a7e72a5f0782f">apr_time_exp_get</a>(apr_time_t *result, 
<a name="l00162"></a>00162                                            <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *input);
<a name="l00163"></a>00163 <span class="comment"></span>
<a name="l00164"></a>00164 <span class="comment">/**</span>
<a name="l00165"></a>00165 <span class="comment"> * Convert time value from human readable format to a numeric apr_time_t that</span>
<a name="l00166"></a>00166 <span class="comment"> * always represents GMT</span>
<a name="l00167"></a>00167 <span class="comment"> * @param result the resulting imploded time</span>
<a name="l00168"></a>00168 <span class="comment"> * @param input the input exploded time</span>
<a name="l00169"></a>00169 <span class="comment"> */</span>
<a name="l00170"></a>00170 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#g52fd74528be3132bec545525e7da4d96">apr_time_exp_gmt_get</a>(apr_time_t *result, 
<a name="l00171"></a>00171                                                <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *input);
<a name="l00172"></a>00172 <span class="comment"></span>
<a name="l00173"></a>00173 <span class="comment">/**</span>
<a name="l00174"></a>00174 <span class="comment"> * Sleep for the specified number of micro-seconds.</span>
<a name="l00175"></a>00175 <span class="comment"> * @param t desired amount of time to sleep.</span>
<a name="l00176"></a>00176 <span class="comment"> * @warning May sleep for longer than the specified time. </span>
<a name="l00177"></a>00177 <span class="comment"> */</span>
<a name="l00178"></a>00178 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<span class="keywordtype">void</span>) <a class="code" href="group__apr__time.html#gd76c632bc9550e7d54830452441c3cd1">apr_sleep</a>(apr_interval_time_t t);
<a name="l00179"></a>00179 <span class="comment"></span>
<a name="l00180"></a>00180 <span class="comment">/** length of a RFC822 Date */</span>
<a name="l00181"></a><a class="code" href="group__apr__time.html#g47edbc08d6a5e0d4931dd0f8c6874971">00181</a> <span class="preprocessor">#define APR_RFC822_DATE_LEN (30)</span>
<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00183"></a>00183 <span class="comment"> * apr_rfc822_date formats dates in the RFC822</span>
<a name="l00184"></a>00184 <span class="comment"> * format in an efficient manner.  It is a fixed length</span>
<a name="l00185"></a>00185 <span class="comment"> * format which requires the indicated amount of storage,</span>
<a name="l00186"></a>00186 <span class="comment"> * including the trailing NUL terminator.</span>
<a name="l00187"></a>00187 <span class="comment"> * @param date_str String to write to.</span>
<a name="l00188"></a>00188 <span class="comment"> * @param t the time to convert </span>
<a name="l00189"></a>00189 <span class="comment"> */</span>
<a name="l00190"></a>00190 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#g57b69ad034f29b46e906cc749d5bf45c">apr_rfc822_date</a>(<span class="keywordtype">char</span> *date_str, apr_time_t t);
<a name="l00191"></a>00191 <span class="comment"></span>
<a name="l00192"></a>00192 <span class="comment">/** length of a CTIME date */</span>
<a name="l00193"></a><a class="code" href="group__apr__time.html#g66fea220c9d1433665b14c28dc4edec4">00193</a> <span class="preprocessor">#define APR_CTIME_LEN (25)</span>
<a name="l00194"></a>00194 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00195"></a>00195 <span class="comment"> * apr_ctime formats dates in the ctime() format</span>
<a name="l00196"></a>00196 <span class="comment"> * in an efficient manner.  it is a fixed length format</span>
<a name="l00197"></a>00197 <span class="comment"> * and requires the indicated amount of storage including</span>
<a name="l00198"></a>00198 <span class="comment"> * the trailing NUL terminator.</span>
<a name="l00199"></a>00199 <span class="comment"> * Unlike ANSI/ISO C ctime(), apr_ctime() does not include</span>
<a name="l00200"></a>00200 <span class="comment"> * a \n at the end of the string.</span>
<a name="l00201"></a>00201 <span class="comment"> * @param date_str String to write to.</span>
<a name="l00202"></a>00202 <span class="comment"> * @param t the time to convert </span>
<a name="l00203"></a>00203 <span class="comment"> */</span>
<a name="l00204"></a>00204 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#g3a7eeab64327950bbba6a52b92a3fd06">apr_ctime</a>(<span class="keywordtype">char</span> *date_str, apr_time_t t);
<a name="l00205"></a>00205 <span class="comment"></span>
<a name="l00206"></a>00206 <span class="comment">/**</span>
<a name="l00207"></a>00207 <span class="comment"> * formats the exploded time according to the format specified</span>
<a name="l00208"></a>00208 <span class="comment"> * @param s string to write to</span>
<a name="l00209"></a>00209 <span class="comment"> * @param retsize The length of the returned string</span>
<a name="l00210"></a>00210 <span class="comment"> * @param max The maximum length of the string</span>
<a name="l00211"></a>00211 <span class="comment"> * @param format The format for the time string</span>
<a name="l00212"></a>00212 <span class="comment"> * @param tm The time to convert</span>
<a name="l00213"></a>00213 <span class="comment"> */</span>
<a name="l00214"></a>00214 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__time.html#ge3a80d73d13bba3b480f9f8b78cc383e">apr_strftime</a>(<span class="keywordtype">char</span> *s, apr_size_t *retsize, 
<a name="l00215"></a>00215                                        apr_size_t max, const <span class="keywordtype">char</span> *format, 
<a name="l00216"></a>00216                                        <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *tm);
<a name="l00217"></a>00217 <span class="comment"></span>
<a name="l00218"></a>00218 <span class="comment">/**</span>
<a name="l00219"></a>00219 <span class="comment"> * Improve the clock resolution for the lifetime of the given pool.</span>
<a name="l00220"></a>00220 <span class="comment"> * Generally this is only desireable on benchmarking and other very</span>
<a name="l00221"></a>00221 <span class="comment"> * time-sensitive applications, and has no impact on most platforms.</span>
<a name="l00222"></a>00222 <span class="comment"> * @param p The pool to associate the finer clock resolution </span>
<a name="l00223"></a>00223 <span class="comment"> */</span>
<a name="l00224"></a>00224 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<span class="keywordtype">void</span>) <a class="code" href="group__apr__time.html#g55b7aa873601cd1c9fb676732751864f">apr_time_clock_hires</a>(<a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p);
<a name="l00225"></a>00225 <span class="comment"></span>
<a name="l00226"></a>00226 <span class="comment">/** @} */</span>
<a name="l00227"></a>00227 
<a name="l00228"></a>00228 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00229"></a>00229 <span class="preprocessor"></span>}
<a name="l00230"></a>00230 <span class="preprocessor">#endif</span>
<a name="l00231"></a>00231 <span class="preprocessor"></span>
<a name="l00232"></a>00232 <span class="preprocessor">#endif  </span><span class="comment">/* ! APR_TIME_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue May 31 12:20:26 2011 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>