|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.Timer
public class Timer
Timer objects measure accumulated time in milliseconds. The timer object functions like a stopwatch. It can be started, stopped, and cleared. When the timer is running its value counts up in milliseconds. When stopped, the timer holds the current value. The implemenation simply records the time when started and subtracts the current time whenever the value is requested.
Constructor Summary | |
---|---|
Timer()
Create a new timer object. |
Method Summary | |
---|---|
static void |
delay(double seconds)
Pause the program for a specified time. |
double |
get()
Get the current time from the timer. |
static long |
getUsClock()
Get the time in microseconds from the FPGA |
void |
reset()
Reset the timer by setting the time to 0. |
void |
start()
Start the timer running. |
void |
stop()
Stop the timer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timer()
Method Detail |
---|
public static void delay(double seconds)
seconds
- Length of time to pausepublic static long getUsClock()
public double get()
public void reset()
public void start()
public void stop()
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |