|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.util.Clock
net.i2p.router.RouterClock
public class RouterClock
Alternate location for determining the time which takes into account an offset. This offset will ideally be periodically updated so as to serve as the difference between the local computer's current time and the time as known by some reference (such as an NTP synchronized clock). RouterClock is a subclass of Clock with access to router transports. Configuration permitting, it will block clock offset changes which would increase peer clock skew.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.i2p.util.Clock |
---|
Clock.ClockUpdateListener |
Field Summary | |
---|---|
(package private) RouterContext |
_context
|
Fields inherited from class net.i2p.util.Clock |
---|
_alreadyChanged, _offset, _startedOn, _statCreated, MAX_LIVE_OFFSET, MAX_OFFSET, MIN_OFFSET_CHANGE |
Constructor Summary | |
---|---|
RouterClock(RouterContext context)
|
Method Summary | |
---|---|
void |
setOffset(long offsetMs,
boolean force)
Specify how far away from the "correct" time the computer is - a positive value means that we are slow, while a negative value means we are fast. |
Methods inherited from class net.i2p.util.Clock |
---|
addUpdateListener, fireOffsetChanged, getInstance, getLog, getOffset, getTimestamper, getUpdatedSuccessfully, now, removeUpdateListener, setNow, setOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
RouterContext _context
Constructor Detail |
---|
public RouterClock(RouterContext context)
Method Detail |
---|
public void setOffset(long offsetMs, boolean force)
setOffset
in class Clock
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |