opsu-dance/lib/lwjgl-2.9.1/javadoc/org/lwjgl/util/Timer.html
2014-06-29 22:17:04 -04:00

392 lines
12 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_17) on Mon Dec 02 20:32:55 CET 2013 -->
<title>Timer (LWJGL API)</title>
<meta name="date" content="2013-12-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Timer (LWJGL API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Timer.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/lwjgl/util/Renderable.html" title="interface in org.lwjgl.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/lwjgl/util/WaveData.html" title="class in org.lwjgl.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/lwjgl/util/Timer.html" target="_top">Frames</a></li>
<li><a href="Timer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.lwjgl.util</div>
<h2 title="Class Timer" class="title">Class Timer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.lwjgl.util.Timer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Timer</span>
extends java.lang.Object</pre>
<div class="block">A hires timer. This measures time in seconds as floating point values.
All Timers created are updated simultaneously by calling the static method
tick(). This ensures that within a single iteration of a game loop that
all timers are updated consistently with each other.</div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Revision$
$Id$</dd>
<dt><span class="strong">Author:</span></dt>
<dd>cix_foo <cix_foo@users.sourceforge.net></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../org/lwjgl/util/Timer.html#Timer()">Timer</a></strong>()</code>
<div class="block">Constructs a timer.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#getTime()">getTime</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#isPaused()">isPaused</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#pause()">pause</a></strong>()</code>
<div class="block">Pause the timer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#reset()">reset</a></strong>()</code>
<div class="block">Reset the timer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#resume()">resume</a></strong>()</code>
<div class="block">Resume the timer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#set(float)">set</a></strong>(float&nbsp;newTime)</code>
<div class="block">Set the time of this timer</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#tick()">tick</a></strong>()</code>
<div class="block">Get the next time update from the system's hires timer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/util/Timer.html#toString()">toString</a></strong>()</code>
<div class="block">Debug output.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Timer()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Timer</h4>
<pre>public&nbsp;Timer()</pre>
<div class="block">Constructs a timer. The timer will be reset to 0.0 and resumed immediately.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getTime()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTime</h4>
<pre>public&nbsp;float&nbsp;getTime()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the time in seconds, as a float</dd></dl>
</li>
</ul>
<a name="isPaused()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPaused</h4>
<pre>public&nbsp;boolean&nbsp;isPaused()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>whether this timer is paused</dd></dl>
</li>
</ul>
<a name="pause()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pause</h4>
<pre>public&nbsp;void&nbsp;pause()</pre>
<div class="block">Pause the timer. Whilst paused the time will not change for this timer
when tick() is called.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/lwjgl/util/Timer.html#resume()"><code>resume()</code></a></dd></dl>
</li>
</ul>
<a name="reset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block">Reset the timer. Equivalent to set(0.0f);</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/lwjgl/util/Timer.html#set(float)"><code>set(float)</code></a></dd></dl>
</li>
</ul>
<a name="resume()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resume</h4>
<pre>public&nbsp;void&nbsp;resume()</pre>
<div class="block">Resume the timer.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/lwjgl/util/Timer.html#pause()"><code>pause()</code></a></dd></dl>
</li>
</ul>
<a name="set(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public&nbsp;void&nbsp;set(float&nbsp;newTime)</pre>
<div class="block">Set the time of this timer</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newTime</code> - the new time, in seconds</dd></dl>
</li>
</ul>
<a name="tick()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tick</h4>
<pre>public static&nbsp;void&nbsp;tick()</pre>
<div class="block">Get the next time update from the system's hires timer. This method should
be called once per main loop iteration; all timers are updated simultaneously
from it.</div>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<div class="block">Debug output.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Timer.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/lwjgl/util/Renderable.html" title="interface in org.lwjgl.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/lwjgl/util/WaveData.html" title="class in org.lwjgl.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/lwjgl/util/Timer.html" target="_top">Frames</a></li>
<li><a href="Timer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><i>Copyright &#169; 2002-2009 lwjgl.org. All Rights Reserved.</i></small></p>
</body>
</html>