mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
time: fix compilation on macos
This commit is contained in:
@ -67,7 +67,8 @@ fn darwin_now() Time {
|
||||
tv := C.timeval{}
|
||||
C.gettimeofday(&tv, 0)
|
||||
loc_tm := C.tm{}
|
||||
C.localtime_r(&tv.tv_sec, &loc_tm)
|
||||
asec := voidptr(&tv.tv_sec)
|
||||
C.localtime_r(&time_t(asec), &loc_tm)
|
||||
return convert_ctime(loc_tm, int(tv.tv_usec))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user