public class TraversalTimer
extends java.lang.Object
Constructor and Description |
---|
TraversalTimer(TraversalContext traversalContext)
Constructs a timer using the time limit of the
TraversalContext . |
Modifier and Type | Method and Description |
---|---|
boolean |
isExpired()
Gets whether the timer is expired.
|
boolean |
isTicking()
Gets whether the timer is still ticking.
|
static void |
setDefaultTime(long time)
Sets the default time in seconds.
|
public TraversalTimer(TraversalContext traversalContext)
TraversalContext
.traversalContext
- the traversal context, which may be null
public static void setDefaultTime(long time)
public boolean isTicking()
true
if the timer interval has not elapsed, or
false
if it has elapsedpublic boolean isExpired()
isTicking()
.true
if the timer interval has elapsed, or
false
if it has not elapsed