interclock

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

README

内部时钟

这个主要用来实现时间轮转任务。例如定时清除某些缓存等。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterClock

type InterClock struct {
	Interval time.Duration    // 轮转圈数, 默认为10
	Ticker   *time.Ticker     // 时钟指针计时器
	Period   int              // 旋转一周的时间, 默认为 T= 1/10秒=100毫秒一圈
	Tasks    []InterClockTask // 任务列表
}

* 这是未来要实现的一个内部时间计数器。 * 时钟, 刻度:[1|2|3|4|5|6|7|8|9|10|11|12] *

type InterClockTask

type InterClockTask func(any) error

Jump to

Keyboard shortcuts

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