stopwatch

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

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// STARTNAME is name of the time which Stopwatch start from
	STARTNAME = "0-Start"
	// ENDNAME is name of the time which Stopwatch end in
	ENDNAME = "(LastLap)"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Stopwatch

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

Stopwatch struct record the lap name and its cost durations(millisecond)

func NewStopwatch

func NewStopwatch() *Stopwatch

NewStopwatch create a Stopwatch and record time with the name of STARTNAME Return a point of own

func (*Stopwatch) End

func (sw *Stopwatch) End() uint32

End function don't need a name

func (*Stopwatch) Lap

func (sw *Stopwatch) Lap(name string) uint32

Lap the time duration from lastest lap

func (*Stopwatch) PrintAll

func (sw *Stopwatch) PrintAll()

PrintAll of Stopwatch status now

Jump to

Keyboard shortcuts

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