chaintime

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicChainTimeProvider

type AtomicChainTimeProvider struct {
	// contains filtered or unexported fields
}

AtomicChainTimeProvider is a simple provider backed by atomic value. It stores the latest chain timestamp (milliseconds precision) and returns it as time.Time.

func (*AtomicChainTimeProvider) Now

Now returns last set time as time.Time in milliseconds precision. If no time was set yet, it returns local system time.

func (*AtomicChainTimeProvider) Set

func (p *AtomicChainTimeProvider) Set(ms uint64)

Set updates current chain time from header timestamp.

Jump to

Keyboard shortcuts

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