Example #1
0
func ExampleTimer_Print_cumulative() {
	t := timer.Start()
	// time-consuming code
	t.Print("first part")
	// more time-consuming code
	t.Print("total")
}
Example #2
0
func ExampleTimer_Print() {
	defer timer.Start().Print()
	// time-consuming code
}
Example #3
0
func ExampleTimer_Printf() {
	defer timer.Start().Printf("%.2f", .9999)
	// time-consuming code
}