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)
SynchedTimeSourcesetOffset in interface SynchedTimeSourcepublic long getOffset()
SynchedTimeSourcegetOffset in interface SynchedTimeSourceprotected void updateDrift(long serverTime)
public void update(ObjectStateMessage msg)
public long getTime()
TimeSourcegetTime in interface TimeSourcepublic long getDrift()
SynchedTimeSourcegetDrift in interface SynchedTimeSource