Documentation ¶
Overview ¶
Package timing provides functions to access raw and synced time with nanosecond precision
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRawTime ¶
func GetRawTime() int64
GetRawTime returns the current time, not sync to the server, with nanosecond precision
func GetSyncedTime ¶
func GetSyncedTime() int64
GetSyncedTime returns the current time, sync to the sever, with nanosecond precision
func ResetOffsets ¶
func ResetOffsets(cap int)
ResetOffsets clears the slice holding offsets by replacing it with an empty slice with cap as capacity
func UpdateOffset ¶
func UpdateOffset(clientSend, serverRecv, serverSend, clientRecv int64)
UpdateOffset handles the four timestamps used to synchronize time to the server
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.