clock

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package clock manages game timers.

There are two types of clocks internally:

System clock:

A clock offered by the OS.

Audio clock:

An audio clock that is used in the higher priority over the system clock.
An audio clock might not exist when the audio is not used.

Index

Constants

View Source
const FPS = 60

Variables

This section is empty.

Functions

func CurrentFPS

func CurrentFPS() float64

func ProceedAudioTimer

func ProceedAudioTimer(num int64)

ProceedAudioTimer increments the audio time by the given number of frames.

func RegisterPing

func RegisterPing(pingFunc func())

func Update

func Update() int

Update updates the inner clock state and returns an integer value indicating how many game frames the game should update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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