clocksmith

package module
v0.0.0-...-392c1af Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 1 Imported by: 9

README

clocksmith

A sleep-aware sleep() function, that doesn't pause (for too long) if the system goes to hibernation.

Documentation

Index

Constants

View Source
const (
	// DefaultGranularity - Maximum duration of actual time.Sleep() calls
	DefaultGranularity = 5 * time.Second
)

Variables

This section is empty.

Functions

func Sleep

func Sleep(duration time.Duration)

Sleep - sleeps for the given amount of time, with the default granularity; doesn't pause if the system goes to hibernation

func SleepWithGranularity

func SleepWithGranularity(duration time.Duration, granularity time.Duration)

SleepWithGranularity - sleeps for the given amount of time, with the given granularity; doesn't pause if the system goes to hibernation

Types

This section is empty.

Jump to

Keyboard shortcuts

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