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

ci: fix v test-cleancode

This commit is contained in:
Delyan Angelov
2021-01-25 11:26:20 +02:00
parent 94fd3ff431
commit 728344ff65
49 changed files with 353 additions and 356 deletions

View File

@@ -40,10 +40,10 @@ fn init_time_base() C.mach_timebase_info_data_t {
fn sys_mono_now_darwin() u64 {
tm := C.mach_absolute_time()
if time_base.denom == 0 {
C.mach_timebase_info(&time_base)
if time.time_base.denom == 0 {
C.mach_timebase_info(&time.time_base)
}
return (tm - start_time) * time_base.numer / time_base.denom
return (tm - time.start_time) * time.time_base.numer / time.time_base.denom
}
// NB: vpc_now_darwin is used by `v -profile` .
@@ -51,10 +51,10 @@ fn sys_mono_now_darwin() u64 {
[inline]
fn vpc_now_darwin() u64 {
tm := C.mach_absolute_time()
if time_base.denom == 0 {
C.mach_timebase_info(&time_base)
if time.time_base.denom == 0 {
C.mach_timebase_info(&time.time_base)
}
return (tm - start_time) * time_base.numer / time_base.denom
return (tm - time.start_time) * time.time_base.numer / time.time_base.denom
}
// darwin_now returns a better precision current time for Darwin based operating system