timerfd

package
Version: v0.0.0-...-f1791b3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimerfdCancelled = errors.New("Timerfd was cancelled due to discontinuous change")

ErrTimerfdCancelled is the error returned when timer is cancelled due to discontinuous clock change. See man timerfd_settime for details.

Functions

This section is empty.

Types

type Timerfd

type Timerfd struct {
	// contains filtered or unexported fields
}

Timerfd provides higher-level abstraction for Linux-specific timerfd timers.

func NewRealtimeTimerfd

func NewRealtimeTimerfd() (*Timerfd, error)

NewRealtimeTimerfd returns a Timerfd backed by CLOCK_REALTIME.

func (*Timerfd) Close

func (t *Timerfd) Close() error

Close closes the underlying timerfd descriptor.

func (*Timerfd) GetClockid

func (t *Timerfd) GetClockid() int

GetClockid returns the clock id that this timerfd uses.

func (*Timerfd) Settime

func (t *Timerfd) Settime(newValue *unix.ItimerSpec, oldValue *unix.ItimerSpec, absolute bool, cancelOnSet bool) error

Settime arms or disarms the timer. See man timerfd_settime for details.

func (*Timerfd) Wait

func (t *Timerfd) Wait() (expirations uint64, err error)

Wait waits until timer expiration. See man timerfd_create for details.

Jump to

Keyboard shortcuts

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