1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

time: consolidate the different sleep functions into time.wait(Duration) (#8853)

This commit is contained in:
zakuro
2021-02-22 00:05:03 +09:00
committed by GitHub
parent b1209aac1b
commit ac4791045f
49 changed files with 156 additions and 179 deletions

View File

@ -53,9 +53,9 @@ fn test_ulids_generated_in_the_same_millisecond_have_the_same_prefix() {
fn test_ulids_should_be_lexicographically_ordered_when_not_in_same_millisecond() {
ulid1 := rand.ulid()
time.sleep_ms(1)
time.wait(1 * time.millisecond)
ulid2 := rand.ulid()
time.sleep_ms(1)
time.wait(1 * time.millisecond)
ulid3 := rand.ulid()
mut all := [ulid3, ulid2, ulid1]
// eprintln('all before: $all')