public class TimeSource
extends java.lang.Object
TimeEventReceiver
interface. This can be used to synchronize multiple components.| Modifier and Type | Class and Description |
|---|---|
static class |
TimeSource.Mode |
| Constructor and Description |
|---|
TimeSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister(TimeEventReceiver receiver) |
TimeSource.Mode |
getMode() |
long |
getTime()
Returns the time (in milliseconds) since the creation of the TimeSource
(or since the last stop).
|
void |
pause()
Pauses the time.
|
void |
play()
If the TimeSource is not already running start the time.
|
void |
register(TimeEventReceiver receiver)
Register a
TimeEventReceiver to receive information about
changes of the TimeSource. |
void |
reset() |
void |
stop() |
public TimeSource.Mode getMode()
public void reset()
public long getTime()
public void register(TimeEventReceiver receiver)
TimeEventReceiver to receive information about
changes of the TimeSource.public void deregister(TimeEventReceiver receiver)
public void play()
public void pause()
public void stop()
Data In Motion Consulting GmbH