clock

package
v1.6.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 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 CurrentMillis

func CurrentMillis() int64

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