time

package
v0.0.0-sei-fork Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonical

func Canonical(t time.Time) time.Time

Canonical returns UTC time with no monotonic component. Stripping the monotonic component is for time equality. See https://github.com/tendermint/tendermint/pull/2203#discussion_r215064334

func Now

func Now() time.Time

Now returns the current time in UTC with no monotonic component.

Types

type DefaultSource

type DefaultSource struct{}

DefaultSource implements the Source interface using the system clock provided by the standard library.

func (DefaultSource) Now

func (DefaultSource) Now() time.Time

type Source

type Source interface {
	Now() time.Time
}

Source is an interface that defines a way to fetch the current time.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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