<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>SFML - Simple and Fast Multimedia Library</title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="tabs.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="logo"> <img src="./logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" /> </div> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.htm"><span>Main Page</span></a></li> <li><a href="modules.htm"><span>Modules</span></a></li> <li class="current"><a href="annotated.htm"><span>Classes</span></a></li> <li><a href="files.htm"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.htm"><span>Class List</span></a></li> <li><a href="classes.htm"><span>Class Index</span></a></li> <li><a href="hierarchy.htm"><span>Class Hierarchy</span></a></li> <li><a href="functions.htm"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><b>sf</b>::<a class="el" href="classsf_1_1Clock.htm">Clock</a> </div> </div> <div class="contents"> <h1>sf::Clock Class Reference<br/> <small> [<a class="el" href="group__system.htm">System module</a>]</small> </h1><!-- doxytag: class="sf::Clock" --> <p>Utility class for manipulating time. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="Clock_8hpp_source.htm">Clock.hpp</a>></code></p> <p><a href="classsf_1_1Clock-members.htm">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Clock.htm#abbc959c7830ca7c3a4da133cb506d3fd">Clock</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#abbc959c7830ca7c3a4da133cb506d3fd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">Uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Clock.htm#a877c9acb875c7963ac72a96f65e294ea">GetElapsedTime</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the time elapsed. <a href="#a877c9acb875c7963ac72a96f65e294ea"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Clock.htm#ae7d8de6876d51fa16675a64c649570ec">Reset</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Restart the timer. <a href="#ae7d8de6876d51fa16675a64c649570ec"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Utility class for manipulating time. </p> <p><a class="el" href="classsf_1_1Clock.htm" title="Utility class for manipulating time.">sf::Clock</a> is a lightweight class for measuring time.</p> <p>Its resolution depends on the underlying OS, but you can generally expect a 1 ms resolution.</p> <p>Usage example: </p> <div class="fragment"><pre class="fragment"> <a class="code" href="classsf_1_1Clock.htm" title="Utility class for manipulating time.">sf::Clock</a> clock; ... Uint32 time1 = clock.<a class="code" href="classsf_1_1Clock.htm#a877c9acb875c7963ac72a96f65e294ea" title="Get the time elapsed.">GetElapsedTime</a>(); clock.<a class="code" href="classsf_1_1Clock.htm#ae7d8de6876d51fa16675a64c649570ec" title="Restart the timer.">Reset</a>(); ... Uint32 time2 = clock.<a class="code" href="classsf_1_1Clock.htm#a877c9acb875c7963ac72a96f65e294ea" title="Get the time elapsed.">GetElapsedTime</a>(); </pre></div> <p>Definition at line <a class="el" href="Clock_8hpp_source.htm#l00040">40</a> of file <a class="el" href="Clock_8hpp_source.htm">Clock.hpp</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="abbc959c7830ca7c3a4da133cb506d3fd"></a><!-- doxytag: member="sf::Clock::Clock" ref="abbc959c7830ca7c3a4da133cb506d3fd" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">sf::Clock::Clock </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Default constructor. </p> <p>The clock starts automatically after being constructed. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a877c9acb875c7963ac72a96f65e294ea"></a><!-- doxytag: member="sf::Clock::GetElapsedTime" ref="a877c9acb875c7963ac72a96f65e294ea" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Uint32 sf::Clock::GetElapsedTime </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the time elapsed. </p> <p>This function returns the time elapsed since the last call to <a class="el" href="classsf_1_1Clock.htm#ae7d8de6876d51fa16675a64c649570ec" title="Restart the timer.">Reset()</a> (or the construction of the instance if <a class="el" href="classsf_1_1Clock.htm#ae7d8de6876d51fa16675a64c649570ec" title="Restart the timer.">Reset()</a> has not been called).</p> <dl class="return"><dt><b>Returns:</b></dt><dd>Time elapsed, in milliseconds </dd></dl> </div> </div> <a class="anchor" id="ae7d8de6876d51fa16675a64c649570ec"></a><!-- doxytag: member="sf::Clock::Reset" ref="ae7d8de6876d51fa16675a64c649570ec" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sf::Clock::Reset </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Restart the timer. </p> <p>This function puts the time counter back to zero. </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="Clock_8hpp_source.htm">Clock.hpp</a></li> </ul> </div> <p id="footer"> :: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> :: </p> </body> </html>