Go Package time
Jump to navigation
Jump to search
External
Internal
Overview
- time.After returns a channel that after the given duration, will send current time on it. This can be used to implement a timeout with select.
time.Sleep()
Sleep pauses the current goroutine for at least the duration d. A negative or zero duration causes Sleep to return immediately:
import "time" ... var secs int secs = 10 time.Sleep(time.Duration(secs) * time.Second)