timer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package timer contains default implementation of [dbft.Timer] interface and provides all necessary timer-related functionality to [dbft.DBFT] service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timer

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

Timer is a default [dbft.Timer] implementation.

func New

func New() *Timer

New returns default Timer implementation.

func (*Timer) C

func (t *Timer) C() <-chan time.Time

C implements Timer interface.

func (*Timer) Extend

func (t *Timer) Extend(d time.Duration)

Extend implements Timer interface.

func (*Timer) Height

func (t *Timer) Height() uint32

Height returns current timer height.

func (*Timer) Now

func (t *Timer) Now() time.Time

Now implements Timer interface.

func (*Timer) Reset

func (t *Timer) Reset(height uint32, view byte, d time.Duration)

Reset implements Timer interface.

func (*Timer) Sleep

func (t *Timer) Sleep(d time.Duration)

Sleep implements Timer interface.

func (*Timer) Stop

func (t *Timer) Stop()

Stop implements Timer interface.

func (*Timer) View

func (t *Timer) View() byte

View return current timer view.

Jump to

Keyboard shortcuts

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