timing

package
v0.0.0-...-62b9041 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL