timeout

package
v0.0.0-...-d98b529 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2017 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timeout

type Timeout interface {
	Reset() bool
	Cancel() bool
}

Timeout is an interface for objects that facilitate managing active timeouts, allowing resetting and canceling

func New

func New(duration time.Duration, timeoutFunc func()) Timeout

New creates a Timeout, which calls timeoutFunc after duration. It can be reset or cancelled.

Jump to

Keyboard shortcuts

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