mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
testdata: clearly correct values for timing test with a little more time to spare on CI machines
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
Vendored
+4
-4
@@ -27,7 +27,7 @@ func main() {
|
|||||||
println("ticker was stopped (didn't send anything after 750ms)")
|
println("ticker was stopped (didn't send anything after 750ms)")
|
||||||
}
|
}
|
||||||
|
|
||||||
timer := time.NewTimer(time.Millisecond * 500)
|
timer := time.NewTimer(time.Millisecond * 750)
|
||||||
println("waiting on timer")
|
println("waiting on timer")
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(time.Millisecond * 200)
|
time.Sleep(time.Millisecond * 200)
|
||||||
@@ -36,10 +36,10 @@ func main() {
|
|||||||
println(" - after 400ms")
|
println(" - after 400ms")
|
||||||
}()
|
}()
|
||||||
<-timer.C
|
<-timer.C
|
||||||
println("waited on timer at 500ms")
|
println("waited on timer at 750ms")
|
||||||
time.Sleep(time.Millisecond * 500)
|
time.Sleep(time.Millisecond * 500)
|
||||||
|
|
||||||
reset := timer.Reset(time.Millisecond * 500)
|
reset := timer.Reset(time.Millisecond * 750)
|
||||||
println("timer reset:", reset)
|
println("timer reset:", reset)
|
||||||
println("waiting on timer")
|
println("waiting on timer")
|
||||||
go func() {
|
go func() {
|
||||||
@@ -49,6 +49,6 @@ func main() {
|
|||||||
println(" - after 400ms")
|
println(" - after 400ms")
|
||||||
}()
|
}()
|
||||||
<-timer.C
|
<-timer.C
|
||||||
println("waited on timer at 500ms")
|
println("waited on timer at 750ms")
|
||||||
time.Sleep(time.Millisecond * 500)
|
time.Sleep(time.Millisecond * 500)
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+2
-2
@@ -7,10 +7,10 @@ waited on ticker at 1000ms
|
|||||||
ticker was stopped (didn't send anything after 750ms)
|
ticker was stopped (didn't send anything after 750ms)
|
||||||
waiting on timer
|
waiting on timer
|
||||||
- after 200ms
|
- after 200ms
|
||||||
waited on timer at 500ms
|
|
||||||
- after 400ms
|
- after 400ms
|
||||||
|
waited on timer at 750ms
|
||||||
timer reset: false
|
timer reset: false
|
||||||
waiting on timer
|
waiting on timer
|
||||||
- after 200ms
|
- after 200ms
|
||||||
waited on timer at 500ms
|
|
||||||
- after 400ms
|
- after 400ms
|
||||||
|
waited on timer at 750ms
|
||||||
|
|||||||
Reference in New Issue
Block a user