From: Yury Smolsky Date: Wed, 31 Oct 2018 15:15:32 +0000 (+0200) Subject: time: display results in examples rather soon X-Git-Tag: go1.12beta1~563 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=86ad85ce98264f79d7f5fc60c38f81275c40d7a6;p=gostls13.git time: display results in examples rather soon We have fixed the playground to display results of the program when it was timed out. This CL fixes how soon results will be displayed to the user. Change-Id: Ifb75828e0de12c726c8ca6e2d04947e01913dc73 Reviewed-on: https://go-review.googlesource.com/c/146237 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/time/example_test.go b/src/time/example_test.go index 7e303ac5a0..0fd325f2e4 100644 --- a/src/time/example_test.go +++ b/src/time/example_test.go @@ -132,7 +132,7 @@ func ExampleAfter() { select { case m := <-c: handle(m) - case <-time.After(5 * time.Minute): + case <-time.After(10 * time.Second): fmt.Println("timed out") } } @@ -144,7 +144,7 @@ func ExampleSleep() { func statusUpdate() string { return "" } func ExampleTick() { - c := time.Tick(1 * time.Minute) + c := time.Tick(5 * time.Second) for now := range c { fmt.Printf("%v %s\n", now, statusUpdate()) }