rate

package
v0.0.0-...-4ef7734 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BPS

type BPS float64

BPS - bytes per second

func (BPS) BPS

func (b BPS) BPS() float64

BPS returns the number of bytes per second

func (BPS) Float

func (b BPS) Float() float64

Float returns the number of bytes per second

func (BPS) GBPS

func (b BPS) GBPS() float64

GBPS returns the number of gigabytes per second

func (BPS) KBPS

func (b BPS) KBPS() float64

KBPS returns the number of kilobytes per second

func (BPS) MBPS

func (b BPS) MBPS() float64

MBPS returns the number of megabytes per second

type Rater

type Rater interface {
	Add(int64)
	Rate() BPS
}

Rater tracks download speed

func SmoothRate

func SmoothRate(smoothness uint) Rater

SmoothRate returns a smooth rater that tracks the speed

Jump to

Keyboard shortcuts

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