clock

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 2 Imported by: 0

Documentation

Overview

Package clock provides a global clock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeStep

func TimeStep() time.Duration

TimeStep 时间轮的步长

Types

type Clock

type Clock interface {
	// Now 当前集群
	Now() time.Time
}

Clock 时钟接口

func GetClock

func GetClock() Clock

GetClock 获取全局时钟

Jump to

Keyboard shortcuts

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