public class RemoteTimeSource extends java.lang.Object implements SynchedTimeSource
Constructor and Description |
---|
RemoteTimeSource() |
RemoteTimeSource(long offset) |
Modifier and Type | Method and Description |
---|---|
long |
getDrift()
Returns the current drift if there is one.
|
long |
getOffset()
Returns the current time offset for this TimeSource.
|
long |
getTime()
Returns the current time in nanoseconds.
|
void |
setOffset(long offset)
Sets a time that will be automatically added into the
normally returned time.
|
void |
update(ObjectStateMessage msg) |
protected void |
updateDrift(long serverTime) |
public RemoteTimeSource()
public RemoteTimeSource(long offset)
public void setOffset(long offset)
SynchedTimeSource
setOffset
in interface SynchedTimeSource
public long getOffset()
SynchedTimeSource
getOffset
in interface SynchedTimeSource
protected void updateDrift(long serverTime)
public void update(ObjectStateMessage msg)
public long getTime()
TimeSource
getTime
in interface TimeSource
public long getDrift()
SynchedTimeSource
getDrift
in interface SynchedTimeSource