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