net.i2p.router
public class RouterClock extends Clock
Clock.ClockUpdateListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_STRATUM |
_alreadyChanged, _context, _offset, _startedOn, _statCreated, MAX_LIVE_OFFSET, MAX_OFFSET, MIN_OFFSET_CHANGE
Constructor and Description |
---|
RouterClock(RouterContext context) |
Modifier and Type | Method and Description |
---|---|
long |
getDeltaOffset() |
long |
now()
Retrieve the current time synchronized with whatever reference clock is in use.
|
void |
setNow(long realTime,
int stratum) |
void |
setOffset(long offsetMs,
boolean force)
Specify how far away from the "correct" time the computer is - a positive
value means that the system time is slow, while a negative value means the system time is fast.
|
addUpdateListener, fireOffsetChanged, getInstance, getLog, getOffset, getTimestamper, getUpdatedSuccessfully, removeUpdateListener, setNow, setOffset
public static final int DEFAULT_STRATUM
public RouterClock(RouterContext context)
public void setOffset(long offsetMs, boolean force)
public void setNow(long realTime, int stratum)
setNow
in interface Timestamper.UpdateListener
setNow
in class Clock
stratum
- used to determine whether we should ignorepublic long now()
public long getDeltaOffset()