Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 312

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.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>GNU CommonC++: ost::SysTime Class Reference</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.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <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="nav">
<a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_sys_time.html">SysTime</a></div>
<h1>ost::SysTime Class Reference</h1><!-- doxytag: class="ost::SysTime" -->This class is used to access non-reentrant date and time functions in the standard C <a class="el" href="namespaceost.html#1a3b6738f6f759fcb52b544a4787cbb2">library.Thread</a> safe date and time functions.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="thread_8h-source.html">thread.h</a>&gt;</code>
<p>
<a href="classost_1_1_sys_time-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<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="classost_1_1_sys_time.html#ab5bc338259759c47df084065f6b605c">getTime</a> (time_t *tloc=NULL)</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="classost_1_1_sys_time.html#ccb0dc3c9d64b224e47649211dbe7b64">time</a> (time_t *tloc)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#9b0387c29a0a79395b7f38dae4ade533">getTimeOfDay</a> (struct timeval *tp)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#fc403fcaa5a8ebf81528a34e5d5a1fac">gettimeofday</a> (struct timeval *tp, struct timezone *)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static struct tm *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#c39180f2c7b282d0145134d14a288480">getLocalTime</a> (const time_t *clock, struct tm *result)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static struct tm *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#f4bd7e44705486a2f0cee2cb98b2f975">locatime</a> (const time_t *clock, struct tm *result)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static struct tm *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#0da1e5fefac7161a878daed011e79932">getGMTTime</a> (const time_t *clock, struct tm *result)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static struct tm *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#1852b1563a7b8f2b96ab75bafe3948eb">gmtime</a> (const time_t *clock, struct tm *result)</td></tr>

<tr><td colspan="2"><br><h2>Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#9c5b33e9cabc7f1510653dbd1f6eb0ae">lock</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_sys_time.html#0d75e27d952de65d6e46b38e57ba605d">unlock</a> (void)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is used to access non-reentrant date and time functions in the standard C <a class="el" href="namespaceost.html#1a3b6738f6f759fcb52b544a4787cbb2">library.Thread</a> safe date and time functions. 
<p>
The class has two purposes:<ul>
<li>1 To be used internaly in CommonCpp's date and time classes to make them thread safe.</li><li>2 To be used by clients as thread safe replacements to the standard C functions, much like <a class="el" href="classost_1_1_thread.html#663d960e8599194f3b25169915c22fb6">Thread::sleep()</a> represents a thread safe version of the standard sleep() function.</li></ul>
<p>
<dl compact><dt><b>Note:</b></dt><dd>The class provides one function with the same name as its equivalent standard function and one with another, unique name. For new clients, the version with the unique name is recommended to make it easy to grep for accidental usage of the standard functions. The version with the standard name is provided for existing clients to sed replace their original version.<p>
Also note that some functions that returned pointers have been redone to take that pointer as an argument instead, making the caller responsible for memory allocation/deallocation. This is almost how POSIX specifies *_r functions (reentrant versions of the standard time functions), except the POSIX functions also return the given pointer while we do not. We don't use the *_r functions as they aren't all generally available on all platforms yet.</dd></dl>
<dl compact><dt><b>Author:</b></dt><dd>Idar Tollefsen &lt;<a href="mailto:idar@cognita.no">idar@cognita.no</a>&gt; </dd></dl>

<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0da1e5fefac7161a878daed011e79932"></a><!-- doxytag: member="ost::SysTime::getGMTTime" ref="0da1e5fefac7161a878daed011e79932" args="(const time_t *clock, struct tm *result)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static struct tm* ost::SysTime::getGMTTime           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const time_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>clock</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>struct tm *&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="c39180f2c7b282d0145134d14a288480"></a><!-- doxytag: member="ost::SysTime::getLocalTime" ref="c39180f2c7b282d0145134d14a288480" args="(const time_t *clock, struct tm *result)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static struct tm* ost::SysTime::getLocalTime           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const time_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>clock</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>struct tm *&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ab5bc338259759c47df084065f6b605c"></a><!-- doxytag: member="ost::SysTime::getTime" ref="ab5bc338259759c47df084065f6b605c" args="(time_t *tloc=NULL)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static time_t ost::SysTime::getTime           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">time_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tloc</em> = <code>NULL</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="fc403fcaa5a8ebf81528a34e5d5a1fac"></a><!-- doxytag: member="ost::SysTime::gettimeofday" ref="fc403fcaa5a8ebf81528a34e5d5a1fac" args="(struct timeval *tp, struct timezone *)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static int ost::SysTime::gettimeofday           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct timeval *&nbsp;</td>
          <td class="mdname" nowrap> <em>tp</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>struct timezone *&nbsp;</td>
          <td class="mdname" nowrap></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="9b0387c29a0a79395b7f38dae4ade533"></a><!-- doxytag: member="ost::SysTime::getTimeOfDay" ref="9b0387c29a0a79395b7f38dae4ade533" args="(struct timeval *tp)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static int ost::SysTime::getTimeOfDay           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct timeval *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tp</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="1852b1563a7b8f2b96ab75bafe3948eb"></a><!-- doxytag: member="ost::SysTime::gmtime" ref="1852b1563a7b8f2b96ab75bafe3948eb" args="(const time_t *clock, struct tm *result)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static struct tm* ost::SysTime::gmtime           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const time_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>clock</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>struct tm *&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="f4bd7e44705486a2f0cee2cb98b2f975"></a><!-- doxytag: member="ost::SysTime::locatime" ref="f4bd7e44705486a2f0cee2cb98b2f975" args="(const time_t *clock, struct tm *result)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static struct tm* ost::SysTime::locatime           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const time_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>clock</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>struct tm *&nbsp;</td>
          <td class="mdname" nowrap> <em>result</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="9c5b33e9cabc7f1510653dbd1f6eb0ae"></a><!-- doxytag: member="ost::SysTime::lock" ref="9c5b33e9cabc7f1510653dbd1f6eb0ae" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static void ost::SysTime::lock           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static, protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ccb0dc3c9d64b224e47649211dbe7b64"></a><!-- doxytag: member="ost::SysTime::time" ref="ccb0dc3c9d64b224e47649211dbe7b64" args="(time_t *tloc)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static time_t ost::SysTime::time           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">time_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tloc</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="0d75e27d952de65d6e46b38e57ba605d"></a><!-- doxytag: member="ost::SysTime::unlock" ref="0d75e27d952de65d6e46b38e57ba605d" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static void ost::SysTime::unlock           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static, protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="thread_8h-source.html">thread.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:58 2006 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>