]> Cypherpunks repositories - gostls13.git/commitdiff
time: display results in examples rather soon
authorYury Smolsky <yury@smolsky.by>
Wed, 31 Oct 2018 15:15:32 +0000 (17:15 +0200)
committerYury Smolsky <yury@smolsky.by>
Wed, 31 Oct 2018 16:29:40 +0000 (16:29 +0000)
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 <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/time/example_test.go

index 7e303ac5a0016301298da54c2982f1038f6a76dd..0fd325f2e4f02f77f3274ee39a1b75bee1f09e71 100644 (file)
@@ -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())
        }