Documentation
¶
Overview ¶
Package timer provides a simple wall-clock duration timer based on standard time. It accumulates total and average over multiple Start / Stop intervals.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Time ¶
type Time struct {
// the most recent starting time
St time.Time
// the total accumulated time
Total time.Duration
// the number of start/stops
N int
}
Time manages the timer accumulated time and count
func (*Time) Avg ¶
Avg returns the average start / stop interval (assumes each was measuring the same thing).
Click to show internal directories.
Click to hide internal directories.