public interface CounterBase
All counters will immediately start counting - reset() them if you need them to be zeroed before use.
Modifier and Type | Interface and Description |
---|---|
static class |
CounterBase.EncodingType
The number of edges for the counterbase to increment or decrement on.
|
Modifier and Type | Method and Description |
---|---|
int |
get()
Get the count.
|
boolean |
getDirection()
Determine which direction the counter is going.
|
double |
getPeriod()
Get the time between the last two edges counted.
|
boolean |
getStopped()
Determine if the counter is not moving.
|
void |
reset()
Reset the count to zero.
|
void |
setMaxPeriod(double maxPeriod)
Set the maximum time between edges to be considered stalled.
|
int get()
void reset()
double getPeriod()
void setMaxPeriod(double maxPeriod)
maxPeriod
- the maximum period in secondsboolean getStopped()
boolean getDirection()