Lagometer

class Lagometer(val frameDurationNs: Duration, historyDuration: Duration, historyResolution: Duration, val numPlayers: Int, startTimeNs: Long, clock: Clock = Clock.System)

Constructors

Link copied to clipboard
constructor(frameDurationNs: Duration, historyDuration: Duration, historyResolution: Duration, numPlayers: Int, startTimeNs: Long, clock: Clock = Clock.System)

Properties

Link copied to clipboard

How much of the above lag could be definitively attributed to each user.

Link copied to clipboard

Total cumulative lag since the game started.

Link copied to clipboard
Link copied to clipboard

How much of the above lag could be definitively attributed to each user.

Link copied to clipboard

The total duration of lag attributed to the game over the history window.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun advanceFrame(nowNs: Long)
Link copied to clipboard
fun receivedInputsFromUser(playerIndex: Int, nowNs: Long)
Link copied to clipboard
fun reset()