ctxtime

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ctxtime waits for a while, or until a context is done.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Poll

func Poll(ctx context.Context, interval time.Duration, fn func() bool) bool

Poll calls fn at once and then every interval until it reports done, or until ctx is done. It reports whether fn did.

func Sleep

func Sleep(ctx context.Context, d time.Duration) bool

Sleep waits for d, or until ctx is done. It reports whether it slept the whole time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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