chrono

package
v1.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MilliSeconds

func MilliSeconds(t time.Time) int64

MilliSeconds 返回 time.Time 的毫秒时间。

func Now

func Now(ctx context.Context) time.Time

Now 获取当前时间。

func ResetTime

func ResetTime(ctx context.Context)

ResetTime 恢复正常时间。

func SetBaseTime

func SetBaseTime(ctx context.Context, t time.Time) error

SetBaseTime 设置基准时间。

func SetFixedTime

func SetFixedTime(ctx context.Context, t time.Time) error

SetFixedTime 设置固定时间。

Types

type TimeNow

type TimeNow interface {
	Get() time.Time
}

Jump to

Keyboard shortcuts

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