meters

package
v0.0.0-...-7d2b485 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 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 BandwidthMeter

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

BandwidthMeter counts the number of bytes written to it over time.

func (*BandwidthMeter) Bandwidth

func (br *BandwidthMeter) Bandwidth() (bytesPerSec float64)

Bandwidth returns the current bandwidth

func (*BandwidthMeter) BytesRead

func (br *BandwidthMeter) BytesRead() (bytes uint64)

BytesRead returns the number of bytes read by this BandwidthMeter

func (*BandwidthMeter) Duration

func (br *BandwidthMeter) Duration() (duration time.Duration)

Duration returns the current duration

func (*BandwidthMeter) Start

func (br *BandwidthMeter) Start()

Start records the start time

func (*BandwidthMeter) Write

func (br *BandwidthMeter) Write(p []byte) (int, error)

Write implements the io.Writer interface.

Jump to

Keyboard shortcuts

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