mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples/concurrency: cleanup (#6018)
This commit is contained in:
parent
4500e7131e
commit
b5de19dc03
@ -6,7 +6,7 @@ fn vlang_time(mut wg sync.WaitGroup) ?string {
|
|||||||
start := time.ticks()
|
start := time.ticks()
|
||||||
data := http.get('https://vlang.io/utc_now')?
|
data := http.get('https://vlang.io/utc_now')?
|
||||||
finish := time.ticks()
|
finish := time.ticks()
|
||||||
println('Finish getting time ${(finish-start)} ms')
|
println('Finish getting time ${finish - start} ms')
|
||||||
println(data.text)
|
println(data.text)
|
||||||
wg.done()
|
wg.done()
|
||||||
return data.text
|
return data.text
|
||||||
@ -16,7 +16,7 @@ fn remote_ip(mut wg sync.WaitGroup) ?string {
|
|||||||
start := time.ticks()
|
start := time.ticks()
|
||||||
data := http.get('https://api.ipify.org')?
|
data := http.get('https://api.ipify.org')?
|
||||||
finish := time.ticks()
|
finish := time.ticks()
|
||||||
println('Finish getting ip ${(finish-start)} ms')
|
println('Finish getting ip ${finish - start} ms')
|
||||||
println(data.text)
|
println(data.text)
|
||||||
wg.done()
|
wg.done()
|
||||||
return data.text
|
return data.text
|
||||||
|
Loading…
Reference in New Issue
Block a user