ode "/doc/progs/go1.go" `/sleepUntil/` `/^}/`}}
--><span class="comment">// sleepUntil sleeps until the specified time. It returns immediately if it&#39;s too late.</span>
func sleepUntil(wakeup time.Time) {
    now := time.Now() <span class="comment">// A Time.</span>
    if !wakeup.After(now) {
        return
    }
    delta := wakeup.Sub(now) <span class="comment">// A Duration.</span>
    fmt.Printf(&#34;Sleeping for %.3fs\n&#34;, delta.Seconds())
    time.Sleep(delta)
}</pre>

<p>
The new types, method