granularcounter

package
v0.0.0-...-a23c0e6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Day

func Day() int

func Forever

func Forever() int

func Hour

func Hour() int

func MakeCountable

func MakeCountable(v int) *countable

func Microsecond

func Microsecond() int

func Millisecond

func Millisecond() int

func Minute

func Minute() int

func Nanosecond

func Nanosecond() int

func Qsec

func Qsec() int

Qsec yields a quarter of a second

func Second

func Second() int

Types

type Countable

type Countable interface {
	Count() int
	Add(int)
}

type GranularCounter

type GranularCounter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewGranularCounter

func NewGranularCounter(bufferCap int) *GranularCounter

func (*GranularCounter) Add

func (g *GranularCounter) Add(v Countable)

func (*GranularCounter) Len

func (g *GranularCounter) Len() int

func (*GranularCounter) NewParent

func (g *GranularCounter) NewParent(nameFunc func() int, bufferCap int) *GranularCounter

func (*GranularCounter) Sum

func (g *GranularCounter) Sum() int

func (*GranularCounter) SumChildren

func (g *GranularCounter) SumChildren() int

func (*GranularCounter) Values

func (g *GranularCounter) Values() []interface{}

Jump to

Keyboard shortcuts

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