Documentation
¶
Index ¶
- func AddTimePoint() time.Time
- func AddTimePointWithLabel(label string) time.Time
- func PrintAll() error
- func Reset()
- func TimeElapsed() (d1 time.Duration, d2 time.Duration)
- func TimeElapsedAfterLabel(label string) (dur time.Duration, err error)
- func Verbose()
- type Stopwatch
- func (sw *Stopwatch) AddTimePoint() time.Time
- func (sw *Stopwatch) AddTimePointWithLabel(label string) time.Time
- func (sw *Stopwatch) GetTimeByLabel(label string) (time.Time, bool)
- func (sw *Stopwatch) PrintAll() error
- func (sw *Stopwatch) Reset()
- func (sw *Stopwatch) TimeElapsed() (d1 time.Duration, d2 time.Duration)
- func (sw *Stopwatch) TimeElapsedAfterLabel(label string) (dur time.Duration, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTimePoint ¶
func AddTimePointWithLabel ¶
func TimeElapsedAfterLabel ¶
Types ¶
type Stopwatch ¶
type Stopwatch struct { TimePoints []time.Time Labels map[string]int LabelsRev map[int]string // contains filtered or unexported fields }
func NewStopwatch ¶
func NewStopwatch() *Stopwatch
func (*Stopwatch) AddTimePoint ¶
func (*Stopwatch) AddTimePointWithLabel ¶
func (*Stopwatch) GetTimeByLabel ¶
func (*Stopwatch) TimeElapsed ¶
return elapsed time it will return 2 results, the first is the duration before the previous one the second is the duration of all
Click to show internal directories.
Click to hide internal directories.