xzticker

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

README

golang 学习项目

定时器的二次包装

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) *ticker

Types

type Option

type Option func(t *ticker)

func WithHandler

func WithHandler(handler func()) Option

func WithInterval

func WithInterval(interval time.Duration) Option

type Ticker

type Ticker interface {
	Run()
	Stop()
}

Jump to

Keyboard shortcuts

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