1
0
Fork 0

Use time.Sleep instead of time.After

This commit is contained in:
Gregory Eremin 2015-10-12 01:31:24 +03:00
parent 12de3f78e0
commit aa4c7f526f
No known key found for this signature in database
GPG Key ID: 5EFA427EEC26E86C
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func SleepSortWithTimeout(a []int, timeout time.Duration) []int {
for _, val := range a {
go func(val int) {
<-start
<-time.After(time.Duration(val) * time.Millisecond)
time.Sleep(time.Duration(val) * time.Millisecond)
results <- val
}(val)
}