ratecounter

package
v0.0.0-...-d687121 Latest Latest
Warning

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

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

Documentation

Overview

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rate

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

func New

func New(interval time.Duration, observe time.Duration) *Rate

func (*Rate) Increment

func (r *Rate) Increment()

func (*Rate) IncrementBy

func (r *Rate) IncrementBy(i int)

func (*Rate) RatePer

func (r *Rate) RatePer(interval time.Duration) float64

func (*Rate) RatePerInterval

func (r *Rate) RatePerInterval() float64

func (*Rate) Total

func (r *Rate) Total() uint64

Jump to

Keyboard shortcuts

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