Package org.photonvision.jni
Class TimeSyncClient
java.lang.Object
org.photonvision.jni.TimeSyncClient
Send ping-pongs to estimate server time, relative to nt::Now. The underlying implementation does
technically allow us to provide a different source, but all photon code assumes nt::Now is used
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Best estimate of the current timestamp at the TSP serverlong
This offset, when added to the current value of nt::now(), yields the timestamp in the timebase of the TSP Servervoid
void
stop()
-
Constructor Details
-
TimeSyncClient
-
-
Method Details
-
setServer
-
stop
public void stop() -
getOffset
public long getOffset()This offset, when added to the current value of nt::now(), yields the timestamp in the timebase of the TSP Server- Returns:
-
currentServerTimestamp
public long currentServerTimestamp()Best estimate of the current timestamp at the TSP server- Returns:
- The current time estimate, in microseconds, at the TSP server
-
getPingMetadata
-
getServer
-