This section is empty.


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.


    This section is empty.


    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.

                GOOS=linux, GOARCH=amd64