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 ¶
func (p *AtomicChainTimeProvider) Now() time.Time
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.
Click to show internal directories.
Click to hide internal directories.