sleeper

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sleeper

type Sleeper interface {
	// Wakeup wakeup the sleeper
	Wakeup()

	// Sleep sleep duration time unless wakeup
	// NOTE: can not sleep multiple times
	Sleep(duration time.Duration)
}

Sleeper not concurrency safe

func NewSleeper

func NewSleeper() Sleeper

Jump to

Keyboard shortcuts

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