clock

package
v0.112.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 2 Imported by: 36

Documentation

Overview

Package clock abstracts time source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopTimer added in v0.35.0

func StopTimer(t Timer)

StopTimer stops timer and drains timer channel if Stop() returned false.

Types

type Clock

type Clock interface {
	Now() time.Time
	Timer(d time.Duration) Timer
	Ticker(d time.Duration) Ticker
}

Clock is current time source.

var System Clock = systemClock{}

System Clock.

type Ticker added in v0.35.0

type Ticker = neo.Ticker

Ticker abstracts a channel that delivers “ticks” of a clock at intervals.

type Timer added in v0.35.0

type Timer = neo.Timer

Timer abstracts a single event.

Jump to

Keyboard shortcuts

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