- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleAfter (0.12 sec)
-
src/time/example_test.go
m, _ := time.ParseDuration("1m30s") fmt.Printf("Take off in t-%.0f seconds.", m.Seconds()) // Output: Take off in t-90 seconds. } var c chan int func handle(int) {} func ExampleAfter() { select { case m := <-c: handle(m) case <-time.After(10 * time.Second): fmt.Println("timed out") } } func ExampleSleep() { time.Sleep(100 * time.Millisecond) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 13 01:05:00 UTC 2024 - 22.4K bytes - Viewed (0)