const clockRate … var czero … // clock returns a low resolution timestamp relative to the process start time. func clock() time.Duration { … } // clockToTime converts a clock() timestamp to an absolute time.Time value. func clockToTime(c time.Duration) time.Time { … } // clockRound returns d rounded to the nearest clockRate increment. func clockRound(d time.Duration) time.Duration { … } // round returns x rounded to the nearest int64 (non-negative values only). func round(x float64) int64 { … } type Percent … // percentOf calculates what percent of the total is x. func percentOf(x, total float64) Percent { … } func (p Percent) Float() float64 { … } func (p Percent) String() string { … }