turnip

package module
v0.0.0-...-d6879c6 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2016 License: MIT Imports: 1 Imported by: 4

README

🍆

From google definitions:

Turnip: informal. a large, thick, old-fashioned pocket watch.

Turnip times operations, keeping average times within a timer. Useful for performance metrics over time.

The observant reader will note that 🍆 is not a turnip. Unnforuntely there is no turnip emoji, so I did my best.

Inspiration

This was written because I was tired of rewriting rolling averages everywhere.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Turnip

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

func NewTurnip

func NewTurnip() *Turnip

Create a new timer

func (*Turnip) AverageMs

func (t *Turnip) AverageMs() float64

Get the average timer duration in Milliseconds

func (*Turnip) Start

func (t *Turnip) Start()

Start a timer

func (*Turnip) Stop

func (t *Turnip) Stop()

Stop a timer, and update stats

Jump to

Keyboard shortcuts

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