wake

package module
v0.0.0-...-557fa8a Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

README

go-wake

Build Status

A simple library to manage waking up the host system from sleep.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplemented = errors.New("not implemented")
View Source
var SleepAlreadyAllowed = errors.New("sleep mode as already been allowed")
View Source
var SleepAlreadyPrevented = errors.New("sleep mode has already been prevented")

Functions

func After

func After(d time.Duration) <-chan time.Time

func AllowSleep

func AllowSleep() error

func PreventSleep

func PreventSleep() error

func Sleep

func Sleep(d time.Duration)

func Tick

func Tick(d time.Duration) <-chan time.Time

Types

type Ticker

type Ticker struct {
	*time.Ticker
	// contains filtered or unexported fields
}

func NewTicker

func NewTicker(d time.Duration) (t *Ticker)

func (*Ticker) Stop

func (t *Ticker) Stop()

type Timer

type Timer struct {
	*time.Timer
	// contains filtered or unexported fields
}

func AfterFunc

func AfterFunc(d time.Duration, f func()) *Timer

func NewTimer

func NewTimer(d time.Duration) *Timer

func (*Timer) Reset

func (t *Timer) Reset(d time.Duration) (active bool)

func (*Timer) Stop

func (t *Timer) Stop() (active bool)

Jump to

Keyboard shortcuts

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