control

package
v2.0.0-...-73bef05 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Starter

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

Starter is control goroutine start with wait Duration, use in loop function

func New

func New(key string) *Starter

New returns a Starter

func (*Starter) SetMaxWait

func (s *Starter) SetMaxWait(t time.Duration)

SetMaxWait set Starter max wait time

func (*Starter) SetMinWait

func (s *Starter) SetMinWait(t time.Duration)

SetMinWait set Starter min wait time

func (*Starter) SetTime

func (s *Starter) SetTime(t *time.Time)

SetTime set Starter time

func (*Starter) Wait

func (s *Starter) Wait() time.Duration

Wait returns wait duration

Jump to

Keyboard shortcuts

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