doc/cxxapi/classPassenger_1_1SystemTime.html in passenger-2.2.9 vs doc/cxxapi/classPassenger_1_1SystemTime.html in passenger-2.2.10

- old
+ new

@@ -8,10 +8,11 @@ <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main&nbsp;Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> @@ -19,15 +20,15 @@ <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li> <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li> </ul> </div> - <div class="navpath"><b>Passenger</b>::<a class="el" href="classPassenger_1_1SystemTime.html">SystemTime</a> + <div class="navpath"><a class="el" href="namespacePassenger.html">Passenger</a>::<a class="el" href="classPassenger_1_1SystemTime.html">SystemTime</a> </div> </div> <div class="contents"> -<h1>Passenger::SystemTime Class Reference</h1><!-- doxytag: class="Passenger::SystemTime" -->This class allows one to obtain the system time, similar to time(). +<h1>Passenger::SystemTime Class Reference</h1><!-- doxytag: class="Passenger::SystemTime" -->This class allows one to obtain the system time, similar to time() and gettimeofday(). <a href="#_details">More...</a> <p> <code>#include &lt;<a class="el" href="SystemTime_8h-source.html">SystemTime.h</a>&gt;</code> <p> @@ -36,23 +37,50 @@ <tr><td></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static time_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#d643b3e5748ee929e013517e6aca046c">get</a> ()</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the time since the Epoch, measured in seconds. <a href="#d643b3e5748ee929e013517e6aca046c"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static unsigned long long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#7573bebcacde25571ee1072b046a21a6">getMsec</a> ()</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the time since the Epoch, measured in milliseconds. <a href="#7573bebcacde25571ee1072b046a21a6"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static unsigned long long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#4e7110f4fb3fa2bfd646608f0ae8249d">getUsec</a> ()</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the time since the Epoch, measured in microseconds. <a href="#4e7110f4fb3fa2bfd646608f0ae8249d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e15eaa6cdbbf8ab91ff740a0ca8ad57b"></a><!-- doxytag: member="Passenger::SystemTime::force" ref="e15eaa6cdbbf8ab91ff740a0ca8ad57b" args="(time_t value)" --> static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#e15eaa6cdbbf8ab91ff740a0ca8ad57b">force</a> (time_t value)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Force <a class="el" href="classPassenger_1_1SystemTime.html#d643b3e5748ee929e013517e6aca046c" title="Returns the time since the Epoch, measured in seconds.">get()</a> to return the given value. <br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76e60fd47ab1f675650b1132b7c10c4c"></a><!-- doxytag: member="Passenger::SystemTime::forceMsec" ref="76e60fd47ab1f675650b1132b7c10c4c" args="(unsigned long long value)" --> +static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#76e60fd47ab1f675650b1132b7c10c4c">forceMsec</a> (unsigned long long value)</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Force <a class="el" href="classPassenger_1_1SystemTime.html#7573bebcacde25571ee1072b046a21a6" title="Returns the time since the Epoch, measured in milliseconds.">getMsec()</a> to return the given value. <br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6d4c44acefc39a576ec3f9e628c88ca5"></a><!-- doxytag: member="Passenger::SystemTime::forceUsec" ref="6d4c44acefc39a576ec3f9e628c88ca5" args="(unsigned long long value)" --> +static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#6d4c44acefc39a576ec3f9e628c88ca5">forceUsec</a> (unsigned long long value)</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Force <a class="el" href="classPassenger_1_1SystemTime.html#4e7110f4fb3fa2bfd646608f0ae8249d" title="Returns the time since the Epoch, measured in microseconds.">getUsec()</a> to return the given value. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa31ee319abe639741327a535c6d22fd"></a><!-- doxytag: member="Passenger::SystemTime::release" ref="aa31ee319abe639741327a535c6d22fd" args="()" --> static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#aa31ee319abe639741327a535c6d22fd">release</a> ()</td></tr> -<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the previously forced value, so that <a class="el" href="classPassenger_1_1SystemTime.html#d643b3e5748ee929e013517e6aca046c" title="Returns the time since the Epoch, measured in seconds.">get()</a> returns the system time once again. <br></td></tr> +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the previously forced seconds value, so that <a class="el" href="classPassenger_1_1SystemTime.html#d643b3e5748ee929e013517e6aca046c" title="Returns the time since the Epoch, measured in seconds.">get()</a> returns the system time once again. <br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0177ab20f22dca37889261aebbe6519d"></a><!-- doxytag: member="Passenger::SystemTime::releaseMsec" ref="0177ab20f22dca37889261aebbe6519d" args="()" --> +static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#0177ab20f22dca37889261aebbe6519d">releaseMsec</a> ()</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the previously forced msec value, so that <a class="el" href="classPassenger_1_1SystemTime.html#7573bebcacde25571ee1072b046a21a6" title="Returns the time since the Epoch, measured in milliseconds.">getMsec()</a> returns the system time once again. <br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e087e2d9503dea21b60d581e4369b235"></a><!-- doxytag: member="Passenger::SystemTime::releaseUsec" ref="e087e2d9503dea21b60d581e4369b235" args="()" --> +static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#e087e2d9503dea21b60d581e4369b235">releaseUsec</a> ()</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the previously forced usec value, so that <a class="el" href="classPassenger_1_1SystemTime.html#4e7110f4fb3fa2bfd646608f0ae8249d" title="Returns the time since the Epoch, measured in microseconds.">getUsec()</a> returns the system time once again. <br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="72a1636723f21458d8ba3b504cd56ea9"></a><!-- doxytag: member="Passenger::SystemTime::releaseAll" ref="72a1636723f21458d8ba3b504cd56ea9" args="()" --> +static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1SystemTime.html#72a1636723f21458d8ba3b504cd56ea9">releaseAll</a> ()</td></tr> + +<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release all previously forced values, so that <a class="el" href="classPassenger_1_1SystemTime.html#d643b3e5748ee929e013517e6aca046c" title="Returns the time since the Epoch, measured in seconds.">get()</a>, <a class="el" href="classPassenger_1_1SystemTime.html#7573bebcacde25571ee1072b046a21a6" title="Returns the time since the Epoch, measured in milliseconds.">getMsec()</a> and <a class="el" href="classPassenger_1_1SystemTime.html#4e7110f4fb3fa2bfd646608f0ae8249d" title="Returns the time since the Epoch, measured in microseconds.">getUsec()</a> return the system time once again. <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> -This class allows one to obtain the system time, similar to time(). +This class allows one to obtain the system time, similar to time() and gettimeofday(). <p> -Unlike time(), it is possible to force a certain time to be returned, which is useful for testing code that depends on the system time. <hr><h2>Member Function Documentation</h2> +Unlike time(), it is possible to force a certain time to be returned, which is useful for testing code that depends on the system time.<p> +<a class="el" href="classPassenger_1_1SystemTime.html#d643b3e5748ee929e013517e6aca046c" title="Returns the time since the Epoch, measured in seconds.">get()</a> provides seconds resolution while <a class="el" href="classPassenger_1_1SystemTime.html#7573bebcacde25571ee1072b046a21a6" title="Returns the time since the Epoch, measured in milliseconds.">getMsec()</a> provides milliseconds resolution. Both clocks can be independently forced to a certain value through <a class="el" href="classPassenger_1_1SystemTime.html#e15eaa6cdbbf8ab91ff740a0ca8ad57b" title="Force get() to return the given value.">force()</a> and <a class="el" href="classPassenger_1_1SystemTime.html#76e60fd47ab1f675650b1132b7c10c4c" title="Force getMsec() to return the given value.">forceMsec()</a>. <hr><h2>Member Function Documentation</h2> <a class="anchor" name="d643b3e5748ee929e013517e6aca046c"></a><!-- doxytag: member="Passenger::SystemTime::get" ref="d643b3e5748ee929e013517e6aca046c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> @@ -67,23 +95,79 @@ <div class="memdoc"> <p> Returns the time since the Epoch, measured in seconds. <p> -Or, if a time was forced, then the forced time is returned instead.<p> +Or, if a time was forced with <a class="el" href="classPassenger_1_1SystemTime.html#e15eaa6cdbbf8ab91ff740a0ca8ad57b" title="Force get() to return the given value.">force()</a>, then the forced time is returned instead.<p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em>&nbsp;</td><td>Something went wrong while retrieving the time. </td></tr> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1TimeRetrievalException.html" title="Unable to retrieve the system time using time().">TimeRetrievalException</a></em>&nbsp;</td><td>Something went wrong while retrieving the time. </td></tr> <tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em>&nbsp;</td><td></td></tr> </table> </dl> </div> </div><p> +<a class="anchor" name="7573bebcacde25571ee1072b046a21a6"></a><!-- doxytag: member="Passenger::SystemTime::getMsec" ref="7573bebcacde25571ee1072b046a21a6" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static unsigned long long Passenger::SystemTime::getMsec </td> + <td>(</td> + <td class="paramname"> </td> + <td>&nbsp;)&nbsp;</td> + <td><code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the time since the Epoch, measured in milliseconds. +<p> +Or, if a time was forced with <a class="el" href="classPassenger_1_1SystemTime.html#76e60fd47ab1f675650b1132b7c10c4c" title="Force getMsec() to return the given value.">forceMsec()</a>, then the forced time is returned instead.<p> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1TimeRetrievalException.html" title="Unable to retrieve the system time using time().">TimeRetrievalException</a></em>&nbsp;</td><td>Something went wrong while retrieving the time. </td></tr> + <tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em>&nbsp;</td><td></td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="4e7110f4fb3fa2bfd646608f0ae8249d"></a><!-- doxytag: member="Passenger::SystemTime::getUsec" ref="4e7110f4fb3fa2bfd646608f0ae8249d" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static unsigned long long Passenger::SystemTime::getUsec </td> + <td>(</td> + <td class="paramname"> </td> + <td>&nbsp;)&nbsp;</td> + <td><code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the time since the Epoch, measured in microseconds. +<p> +Or, if a time was forced with <a class="el" href="classPassenger_1_1SystemTime.html#6d4c44acefc39a576ec3f9e628c88ca5" title="Force getUsec() to return the given value.">forceUsec()</a>, then the forced time is returned instead.<p> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1TimeRetrievalException.html" title="Unable to retrieve the system time using time().">TimeRetrievalException</a></em>&nbsp;</td><td>Something went wrong while retrieving the time. </td></tr> + <tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em>&nbsp;</td><td></td></tr> + </table> +</dl> + +</div> +</div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="SystemTime_8h-source.html">SystemTime.h</a></ul> </div> -<hr size="1"><address style="text-align: right;"><small>Generated on Wed Apr 8 22:35:12 2009 for Passenger by&nbsp; +<hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 8 22:53:23 2010 for Passenger by&nbsp; <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>