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:
@ -50,7 +50,7 @@ fn test_a_simple_vweb_app_runs_in_the_background() {
|
||||
res := os.system(server_exec_cmd)
|
||||
assert res == 0
|
||||
}
|
||||
time.wait(100 * time.millisecond)
|
||||
time.sleep(100 * time.millisecond)
|
||||
}
|
||||
|
||||
// web client tests follow
|
||||
@ -238,7 +238,7 @@ fn simple_tcp_client(config SimpleTcpClientConfig) ?string {
|
||||
if tries > config.retries {
|
||||
return error(err)
|
||||
}
|
||||
time.wait(100 * time.millisecond)
|
||||
time.sleep(100 * time.millisecond)
|
||||
continue
|
||||
}
|
||||
break
|
||||
|
@ -15,7 +15,7 @@ struct App {
|
||||
}
|
||||
|
||||
fn exit_after_timeout(timeout_in_ms int) {
|
||||
time.wait(timeout_in_ms * time.millisecond)
|
||||
time.sleep(timeout_in_ms * time.millisecond)
|
||||
// eprintln('webserver is exiting ...')
|
||||
exit(0)
|
||||
}
|
||||
@ -105,6 +105,6 @@ pub fn (mut app App) shutdown() vweb.Result {
|
||||
|
||||
fn (mut app App) gracefull_exit() {
|
||||
eprintln('>> webserver: gracefull_exit')
|
||||
time.wait(100 * time.millisecond)
|
||||
time.sleep(100 * time.millisecond)
|
||||
exit(0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user