rate

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpeedLimiter

type SpeedLimiter struct {
	*time.Timer
	// contains filtered or unexported fields
}

func NewRandSpeedLimiter

func NewRandSpeedLimiter(start, stop time.Duration) *SpeedLimiter

start:最小等待时间 stop:最大等待时间 stop-start: 等待范围

func NewSpeedLimiter

func NewSpeedLimiter(interval time.Duration) *SpeedLimiter

func (*SpeedLimiter) Reset

func (s *SpeedLimiter) Reset()

Jump to

Keyboard shortcuts

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