speeds

package
v3.5.3+incompatible Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package speeds 速度计算工具包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

type Adder interface {
	Add(int64)
}

Adder 增加

type Speeds

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

Speeds 统计下载速度

func (*Speeds) Add

func (sps *Speeds) Add(readed int64)

Add 原子操作, 增加数据量

func (*Speeds) GetSpeedsPerSecond

func (sps *Speeds) GetSpeedsPerSecond() (speeds int64)

GetSpeedsPerSecond 结束统计速度, 并返回每秒的速度

func (*Speeds) Init

func (sps *Speeds) Init()

Init 初始化

Jump to

Keyboard shortcuts

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