ebiten: github.com/hajimehoshi/ebiten/internal/clock Index | Files

package clock

import "github.com/hajimehoshi/ebiten/internal/clock"

Package clock manages game timers.

Index

Package Files

clock.go now.go

Constants

const UncappedTPS = -1

func CurrentFPS Uses

func CurrentFPS() float64

func CurrentTPS Uses

func CurrentTPS() float64

func Update Uses

func Update(tps int) int

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.

Package clock imports 2 packages (graph) and is imported by 2 packages. Updated 2019-05-26. Refresh now. Tools for package owners.