timing

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package timing provides utilities for time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FPS

func FPS(lastTime, now time.Time) float64

FPS returns the number of frames being processed per second, supposing a time interval from lastTime to now.

func FPSToFrameDelay

func FPSToFrameDelay(frameRate int) time.Duration

FPSToFrameDelay converts a frameRate like 60fps into a delay time between frames

func FPSToNano

func FPSToNano(fps float64) int64

FPSToNano converts a framesPerSecond value to the number of nanoseconds that should take place for each frame.

func FrameDelayToFPS

func FrameDelayToFPS(dur time.Duration) float64

FrameDelayToFPS converts a duration of delay between frames into a frames per second count

Types

This section is empty.

Jump to

Keyboard shortcuts

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