util

package
v44.23.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableOOM

func DisableOOM(pid int) error

DisableOOM disables oom killer for the given process

func SleepUntilWallClock added in v44.8.3

func SleepUntilWallClock(wakeAt time.Time, ctx context.Context) bool

SleepUntilWallClock is like time.Sleep, but will wake at or near the given time even if the host hibernates before wakeAt. The time.Sleep function uses a timer that stops ticking during host hibernation.

Returns true if the sleep ran to wakeAt, or false if the context is cancelled before then.

In the interest of saving power, this function sleeps for 1 minute at a time, checking the wall clock after each minute. If the host returns from hiberanation less than 1 minute before wakeAt, it is possible that this function will sleep up to 1 minute past wakeAt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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