Documentation ¶
Overview ¶
Package clock manages game timers.
Index ¶
Constants ¶
View Source
const UncappedTPS = -1
Variables ¶
This section is empty.
Functions ¶
func CurrentFPS ¶
func CurrentFPS() float64
func CurrentTPS ¶ added in v1.8.0
func CurrentTPS() float64
func Update ¶
Update updates the inner clock state and returns an integer value indicating how many times the game should update based on given tps. tps represents TPS (ticks per second). If tps is UncappedTPS, Update always returns 1. If tps <= 0 and not UncappedTPS, Update always returns 0.
Update is expected to be called per frame.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.