|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpslib.PSTimer
public class PSTimer
PSTimer Class
The PSTimer object provides timer funtionality. The object also stores the delta time between updates.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Constructor Summary | |
---|---|
PSTimer()
Create a new object instance |
Method Summary | |
---|---|
long |
delta()
Return the time between calls to time() in milliseconds |
boolean |
isPaused()
Return true if the timer is paused |
void |
pause(boolean p)
Pause the timer |
void |
reset()
Reset the timer to 0 |
void |
reset(int t)
Reset the timer to the specified value |
long |
time()
Update the timer and return the current time in milliseconds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PSTimer()
Method Detail |
---|
public final long time()
public final long delta()
public final void reset()
public final void reset(int t)
t
- time in millisecondspublic final void pause(boolean p)
p
- booleanpublic final boolean isPaused()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |