tools

package
v0.0.0-...-1472157 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(addr string, opts []grpc.DialOption) (
	client pb.TransistorServiceClient,
	conn *grpc.ClientConn,
	err error,
)

Types

type Counter

type Counter struct {
	I   *big.Int
	F   *big.Float
	Mod *big.Int
}

func NewCounter

func NewCounter(mod int64) *Counter

func (*Counter) Add

func (c *Counter) Add(x int64)

func (*Counter) AddOne

func (c *Counter) AddOne()

func (*Counter) IsModZero

func (c *Counter) IsModZero() bool

func (*Counter) Quo

func (c *Counter) Quo(x float64) *big.Float

func (*Counter) Reset

func (c *Counter) Reset()

func (*Counter) String

func (c *Counter) String() string

type Timer

type Timer interface {
	Set()             // set another new timer session
	End() <-chan bool // get asynchronous notification
	Stop()            // release the goroutine
}

func NewTimer

func NewTimer(d time.Duration) Timer

Warning: the goroutine does not automatically stop. Timer.Stop() should be called manually.

Jump to

Keyboard shortcuts

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