For the following piece of code.

func main() {
start := time.Now()
defer fmt.Println(time.Since(start))
time.Sleep(1000000000)
fmt.Println("Hello, playground")
fmt.Println(time.Since(start))
}

The output is:

Hello, playground
1s
0s


I'm new at golang. Should the two time.Since both be called after the 
sleep? 
Thank you!

-- 
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/fa0a8064-ee75-423e-8ec8-195bc43e4824%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to