pacing

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pacing tells whether frames of native UI wait for the display.

They do, unless GOLET_UNCAPPED asks otherwise: a frame that follows another draws at the display's next refresh, as the display link, GTK's frame clock or the swap chain's room says, and so every scene cheaper than a refresh shows the display's rate. Uncapped, as benchmarks, profilers and apps that want the least latency ask for, the next frame starts as soon as the last was presented, and the frame rate tells how much of a refresh a scene leaves. An idle window still draws nothing: only the frames asked for come sooner. The window host (package ui), the backends and the GPU renderers read Uncapped, each where it waits for the display; "Frame pacing" in docs/ui/rendering.md tells what each platform does.

Index

Constants

This section is empty.

Variables

View Source
var Uncapped = uncapped(os.Getenv("GOLET_UNCAPPED"), runtime.GOOS)

Uncapped tells that GOLET_UNCAPPED asked frames to present without waiting for the display. It is read once, as the program starts; in browsers, whose requestAnimationFrame paces frames and nothing presents sooner, it stays false. Tests set it.

Functions

func Setting

func Setting(v string) bool

Setting reports whether v, GOLET_UNCAPPED's value, asks for frames uncapped: 1 (or true, on, yes) does, and nothing, 0 (false, off, no) does not. Another value is a mistake, logged, which leaves frames paced.

Types

This section is empty.

Jump to

Keyboard shortcuts

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