delay

package
v0.0.0-...-2e22e3b Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sleep

func Sleep(duration time.Duration)

Sleep for a very precise short duration by busy-waiting for the given time. This is not an efficient way to sleep: it will needlessly burn cycles while sleeping. But it is useful for sleeping for a very short duration, for example for bit-banged protocols.

Longer durations (longer than a few milliseconds) will be handled by calling time.Sleep instead.

This function should be called with a constant duration value, in which case the call will typically be fully inlined and only take up around nine instructions for the entire loop.

Types

This section is empty.

Jump to

Keyboard shortcuts

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