1
0
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:
Alexander Medvednikov
2021-02-27 20:41:06 +03:00
parent be4a2e17d3
commit 3a2d696fac
42 changed files with 76 additions and 67 deletions

View File

@ -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

View File

@ -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)
}