Back to godoc.org

Package clock

v1.11.6
Latest Go to latest
Published: Jul 30, 2020 | License: Apache-2.0 | Module: github.com/hajimehoshi/ebiten

Overview

Package clock manages game timers.

Index

Package Files

Constants

const UncappedTPS = -1

func CurrentFPS

func CurrentFPS() float64

func CurrentTPS

func CurrentTPS() float64

func Update

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier