Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 96

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: CS::MeasureTime Class Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
    <li class="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>
  </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="namespaceCS.html">CS</a>::<a class="el" href="classCS_1_1MeasureTime.html">MeasureTime</a></div>
<h1>CS::MeasureTime Class Reference<br>
<small>
[<a class="el" href="group__util.html">Utilities</a>]</small>
</h1><!-- doxytag: class="CS::MeasureTime" -->Simple helper class to measure execution time of a block.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="measuretime_8h-source.html">csutil/measuretime.h</a>&gt;</code>
<p>

<p>
<a href="classCS_1_1MeasureTime-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1MeasureTime.html#305f7ccf5210101f1038fb0c1762c0f8">MeasureTime</a> (const char *format,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct with a formatted description string.  <a href="#305f7ccf5210101f1038fb0c1762c0f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1MeasureTime.html#c7178997ae62bb66eea28937f0c5fa8a">PrintIntermediate</a> (const char *descr,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print an intermediate measurement.  <a href="#c7178997ae62bb66eea28937f0c5fa8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33dae9eea229063ca2fc1602c01cfbd9"></a><!-- doxytag: member="CS::MeasureTime::~MeasureTime" ref="33dae9eea229063ca2fc1602c01cfbd9" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1MeasureTime.html#33dae9eea229063ca2fc1602c01cfbd9">~MeasureTime</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="11ea32b220fdbd3cbff6629491a45422"></a><!-- doxytag: member="CS::MeasureTime::offsetTime" ref="11ea32b220fdbd3cbff6629491a45422" args="" -->
<a class="el" href="group__util.html#gecfc3c54bd29ad5964e1c1c3ccbf89df">int64</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1MeasureTime.html#11ea32b220fdbd3cbff6629491a45422">offsetTime</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="162d3fe7ca561490e289e65344fef807"></a><!-- doxytag: member="CS::MeasureTime::text" ref="162d3fe7ca561490e289e65344fef807" args="" -->
<a class="el" href="classcsString.html">csString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1MeasureTime.html#162d3fe7ca561490e289e65344fef807">text</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Simple helper class to measure execution time of a block. 
<p>
When destructed, <a class="el" href="group__util.html#gd4b0fa911161355ff8284407897d2537" title="CS version of printf.">csPrintf()</a>s the time that has passed between construction and destruction in microseconds.<p>
Use like: <div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Foo (<span class="keywordtype">int</span> x)
 {
   <a class="code" href="classCS_1_1MeasureTime.html" title="Simple helper class to measure execution time of a block.">CS::MeasureTime</a> measureFoo (<span class="stringliteral">"Foo (%d) time"</span>, x);
   
   <span class="comment">// ...</span>
 }
</pre></div> This will print the total execution time of Foo(). 
<p>Definition at line <a class="el" href="measuretime_8h-source.html#l00054">54</a> of file <a class="el" href="measuretime_8h-source.html">measuretime.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="305f7ccf5210101f1038fb0c1762c0f8"></a><!-- doxytag: member="CS::MeasureTime::MeasureTime" ref="305f7ccf5210101f1038fb0c1762c0f8" args="(const char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CS::MeasureTime::MeasureTime           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct with a formatted description string. 
<p>

<p>Definition at line <a class="el" href="measuretime_8h-source.html#l00064">64</a> of file <a class="el" href="measuretime_8h-source.html">measuretime.h</a>.</p>

<p>References <a class="el" href="group__util.html#gdbdc1c0f010b84953b0e22b836c2a147">csGetMicroTicks()</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="c7178997ae62bb66eea28937f0c5fa8a"></a><!-- doxytag: member="CS::MeasureTime::PrintIntermediate" ref="c7178997ae62bb66eea28937f0c5fa8a" args="(const char *descr,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CS::MeasureTime::PrintIntermediate           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>descr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Print an intermediate measurement. 
<p>

<p>Definition at line <a class="el" href="measuretime_8h-source.html#l00082">82</a> of file <a class="el" href="measuretime_8h-source.html">measuretime.h</a>.</p>

<p>References <a class="el" href="group__util.html#gdbdc1c0f010b84953b0e22b836c2a147">csGetMicroTicks()</a>, <a class="el" href="group__util.html#gd4b0fa911161355ff8284407897d2537">csPrintf()</a>, and <a class="el" href="group__util.html#gbe7d07ccb07f558f4a15faf123682da6">csPrintfV()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="measuretime_8h-source.html">measuretime.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>