Finally, simple time.Durations know how to print themselves directly, and time.Sub() produces a Duration.
So if you have var tm1, tm2 time.Time you can do fmt.Printf("difference = %v\n", tm2.Sub(tm1)) // subtraction yields a time.Dur -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/46bd66c6-2395-45a0-a4d7-4493b7f43015%40googlegroups.com.