public class Synchronizer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
close()
Shut down the Synchronizer.
|
long |
correctedTimeNow()
Returns the time corrected with short-term correction.
|
void |
displayClock() |
void |
doAtTime(java.lang.Runnable r,
long time)
Cause an event to happen at the given time.
|
static Synchronizer |
getInstance() |
float |
getStability()
Return measure of the stability of the time correction.
|
static void |
main(java.lang.String[] args) |
long |
stableTimeNow()
Returns the time corrected with long-term correction.
|
static long |
time()
This returns the time in Linux format (ms since Jan 1st 1970) according to the synchronization.
|
public static Synchronizer getInstance()
public static long time()
public long stableTimeNow()
public long correctedTimeNow()
stableTimeNow()
.public void displayClock()
public void doAtTime(java.lang.Runnable r, long time)
r
- the Runnable
to run at the given time.time
- the synchronized time to enact the event, in ms since 1st Jan 1970.public void close()
public float getStability()
public static void main(java.lang.String[] args)