clock

package
v0.0.0-...-87e9d67 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package clock abstracts time source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopTimer

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

type Ticker = neo.Ticker

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

type Timer

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