func main() { // This will block for 5 seconds and then return the current time theTime := <-time.After(time.Second * 5) fmt.Println(theTime.Format("2006-01-02 15:04:05")) }