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

builder: search for .v files in /src/ if there are none

This commit is contained in:
Alexander Medvednikov
2022-07-03 08:41:26 +03:00
parent b5f2636b73
commit c90e8185ed
3 changed files with 24 additions and 3 deletions

View File

@ -42,7 +42,9 @@ fn init_time_base() C.mach_timebase_info_data_t {
fn sys_mono_now_darwin() u64 {
tm := C.mach_absolute_time()
if time.time_base.denom == 0 {
C.mach_timebase_info(&time.time_base)
unsafe {
C.mach_timebase_info(&time.time_base)
}
}
return (tm - time.start_time) * time.time_base.numer / time.time_base.denom
}
@ -53,7 +55,9 @@ fn sys_mono_now_darwin() u64 {
fn vpc_now_darwin() u64 {
tm := C.mach_absolute_time()
if time.time_base.denom == 0 {
C.mach_timebase_info(&time.time_base)
unsafe {
C.mach_timebase_info(&time.time_base)
}
}
return (tm - time.start_time) * time.time_base.numer / time.time_base.denom
}