<!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>Irrlicht Engine: irr::ITimer Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table class="irrlicht" > <tr valign="middle"> <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> Namespace Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td> </tr> </table> <!-- Generated by Doxygen 1.5.6 --> <div class="navpath"><a class="el" href="namespaceirr.html">irr</a>::<a class="el" href="classirr_1_1_i_timer.html">ITimer</a> </div> <div class="contents"> <h1>irr::ITimer Class Reference</h1><!-- doxytag: class="irr::ITimer" --><!-- doxytag: inherits="irr::IReferenceCounted" -->Interface for getting and manipulating the virtual time. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="_i_timer_8h-source.html">ITimer.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for irr::ITimer:</div> <div class="dynsection"> <p><center><img src="classirr_1_1_i_timer.png" usemap="#irr::ITimer_map" border="0" alt=""></center> <map name="irr::ITimer_map"> <area href="classirr_1_1_i_reference_counted.html" alt="irr::IReferenceCounted" shape="rect" coords="0,0,140,24"> </map> </div> <p> <a href="classirr_1_1_i_timer-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">virtual <a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#67d6b3ae61c2e6aaad82c4ae15ab55f1">getRealTime</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns current real time in milliseconds of the system. <a href="#67d6b3ae61c2e6aaad82c4ae15ab55f1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07">f32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#c2b3c1947d78e5bb9dc62f32edc4e1b2">getSpeed</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns current speed of the timer. <a href="#c2b3c1947d78e5bb9dc62f32edc4e1b2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#a2c53890268d6886b3b5bbf2af5dba9c">getTime</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns current virtual time in milliseconds. <a href="#a2c53890268d6886b3b5bbf2af5dba9c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#c868245b9562f0c13b2e0ce127c48532">isStopped</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns if the virtual timer is currently stopped. <a href="#c868245b9562f0c13b2e0ce127c48532"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#13f3f4919a3431733bc90cd87d110675">setSpeed</a> (<a class="el" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07">f32</a> speed=1.0f)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the speed of the timer. <a href="#13f3f4919a3431733bc90cd87d110675"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#e93bf312ccf87478565e080450291386">setTime</a> (<a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> time)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">sets current virtual time <a href="#e93bf312ccf87478565e080450291386"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#9467dc5a72de3869712715d0473c9697">start</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Starts the virtual timer. <a href="#9467dc5a72de3869712715d0473c9697"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#649e7294fafc6e6de00f9a4dc6894c16">stop</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stops the virtual timer. <a href="#649e7294fafc6e6de00f9a4dc6894c16"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#50ee793711cace4410e1f9c9e1ce20c6">tick</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Advances the virtual time. <a href="#50ee793711cace4410e1f9c9e1ce20c6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_timer.html#a570a4921370e5f21bc0856b00d2791c">~ITimer</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">destructor <a href="#a570a4921370e5f21bc0856b00d2791c"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Interface for getting and manipulating the virtual time. <p>Definition at line <a class="el" href="_i_timer_8h-source.html#l00014">14</a> of file <a class="el" href="_i_timer_8h-source.html">ITimer.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a570a4921370e5f21bc0856b00d2791c"></a><!-- doxytag: member="irr::ITimer::~ITimer" ref="a570a4921370e5f21bc0856b00d2791c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual irr::ITimer::~ITimer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> destructor <p> <p>Definition at line <a class="el" href="_i_timer_8h-source.html#l00019">19</a> of file <a class="el" href="_i_timer_8h-source.html">ITimer.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="67d6b3ae61c2e6aaad82c4ae15ab55f1"></a><!-- doxytag: member="irr::ITimer::getRealTime" ref="67d6b3ae61c2e6aaad82c4ae15ab55f1" args="() const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> irr::ITimer::getRealTime </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns current real time in milliseconds of the system. <p> This value does not start with 0 when the application starts. For example in one implementation the value returned could be the amount of milliseconds which have elapsed since the system was started. </div> </div><p> <a class="anchor" name="c2b3c1947d78e5bb9dc62f32edc4e1b2"></a><!-- doxytag: member="irr::ITimer::getSpeed" ref="c2b3c1947d78e5bb9dc62f32edc4e1b2" args="() const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07">f32</a> irr::ITimer::getSpeed </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns current speed of the timer. <p> The speed is the factor with which the time is running faster or slower then the real system time. </div> </div><p> <a class="anchor" name="a2c53890268d6886b3b5bbf2af5dba9c"></a><!-- doxytag: member="irr::ITimer::getTime" ref="a2c53890268d6886b3b5bbf2af5dba9c" args="() const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> irr::ITimer::getTime </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns current virtual time in milliseconds. <p> This value starts with 0 and can be manipulated using <a class="el" href="classirr_1_1_i_timer.html#e93bf312ccf87478565e080450291386" title="sets current virtual time">setTime()</a>, stopTimer(), startTimer(), etc. This value depends on the set speed of the timer if the timer is stopped, etc. If you need the system time, use <a class="el" href="classirr_1_1_i_timer.html#67d6b3ae61c2e6aaad82c4ae15ab55f1" title="Returns current real time in milliseconds of the system.">getRealTime()</a> </div> </div><p> <a class="anchor" name="c868245b9562f0c13b2e0ce127c48532"></a><!-- doxytag: member="irr::ITimer::isStopped" ref="c868245b9562f0c13b2e0ce127c48532" args="() const =0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool irr::ITimer::isStopped </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns if the virtual timer is currently stopped. <p> </div> </div><p> <a class="anchor" name="13f3f4919a3431733bc90cd87d110675"></a><!-- doxytag: member="irr::ITimer::setSpeed" ref="13f3f4919a3431733bc90cd87d110675" args="(f32 speed=1.0f)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::ITimer::setSpeed </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07">f32</a> </td> <td class="paramname"> <em>speed</em> = <code>1.0f</code> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the speed of the timer. <p> The speed is the factor with which the time is running faster or slower then the real system time. </div> </div><p> <a class="anchor" name="e93bf312ccf87478565e080450291386"></a><!-- doxytag: member="irr::ITimer::setTime" ref="e93bf312ccf87478565e080450291386" args="(u32 time)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::ITimer::setTime </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceirr.html#0416a53257075833e7002efd0a18e804">u32</a> </td> <td class="paramname"> <em>time</em> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> sets current virtual time <p> </div> </div><p> <a class="anchor" name="9467dc5a72de3869712715d0473c9697"></a><!-- doxytag: member="irr::ITimer::start" ref="9467dc5a72de3869712715d0473c9697" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::ITimer::start </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Starts the virtual timer. <p> The timer is reference counted, which means everything which calls <a class="el" href="classirr_1_1_i_timer.html#649e7294fafc6e6de00f9a4dc6894c16" title="Stops the virtual timer.">stop()</a> will also have to call <a class="el" href="classirr_1_1_i_timer.html#9467dc5a72de3869712715d0473c9697" title="Starts the virtual timer.">start()</a>, otherwise the timer may not start/stop correctly again. </div> </div><p> <a class="anchor" name="649e7294fafc6e6de00f9a4dc6894c16"></a><!-- doxytag: member="irr::ITimer::stop" ref="649e7294fafc6e6de00f9a4dc6894c16" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::ITimer::stop </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Stops the virtual timer. <p> The timer is reference counted, which means everything which calls <a class="el" href="classirr_1_1_i_timer.html#649e7294fafc6e6de00f9a4dc6894c16" title="Stops the virtual timer.">stop()</a> will also have to call <a class="el" href="classirr_1_1_i_timer.html#9467dc5a72de3869712715d0473c9697" title="Starts the virtual timer.">start()</a>, otherwise the timer may not start/stop correctly again. </div> </div><p> <a class="anchor" name="50ee793711cace4410e1f9c9e1ce20c6"></a><!-- doxytag: member="irr::ITimer::tick" ref="50ee793711cace4410e1f9c9e1ce20c6" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void irr::ITimer::tick </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Advances the virtual time. <p> Makes the virtual timer update the time value based on the real time. This is called automatically when calling <a class="el" href="classirr_1_1_irrlicht_device.html#0489f8151dc43f6f41503ffb5a160b35" title="Runs the device.">IrrlichtDevice::run()</a>, but you can call it manually if you don't use this method. </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="_i_timer_8h-source.html">ITimer.h</a></ul> </div> <hr size="1"> <address style="align: right;"> <small> </small> </address> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td> <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht Engine</a> Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:09 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> (1.5.6)</font></em></small></div></td> </tr> </table> <address style="align: right;"> </address> </body> </html>