# Go Pop quiz: what time was it?

> Source: <https://dave.cheney.net/2025/12/18/pop-quiz-what-time-was-it>
> Published: 2026-07-10 22:33:16+00:00

Here’s a small quiz derived from some incorrect advice from an AI coding assistant.

```
package main

import (
    "fmt"
    "time"
)

func main() {
    fmt.Println(time.Now())
    defer fmt.Println(time.Now())
    time.Sleep(10 * time.Second)
}
```

This program prints two timestamps; will they be

a. Roughly the same time (ie, the same second)

b. Roughly 10 seconds apart

c. Something else

Answer after the fold

Pages: 1
