mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
time: time.wait() => time.sleep()
This commit is contained in:
@ -3,7 +3,7 @@ import time
|
||||
// Simulate expensive computing using sleep function
|
||||
fn expensive_computing(id int, duration int) {
|
||||
println('Executing expensive computing task ($id)...')
|
||||
time.wait(duration * time.millisecond)
|
||||
time.sleep(duration * time.millisecond)
|
||||
println('Finish task $id on $duration ms')
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user