mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sync: fix compilation on windows
This commit is contained in:
parent
2cd5b8a86d
commit
367289a1f1
@ -176,7 +176,7 @@ pub fn (mut sem Semaphore) timed_wait(timeout time.Duration) bool {
|
|||||||
C.GetSystemTimeAsFileTime(&ft_start)
|
C.GetSystemTimeAsFileTime(&ft_start)
|
||||||
time_end := ((u64(ft_start.dwHighDateTime) << 32) | ft_start.dwLowDateTime) +
|
time_end := ((u64(ft_start.dwHighDateTime) << 32) | ft_start.dwLowDateTime) +
|
||||||
u64(timeout / (100 * time.nanosecond))
|
u64(timeout / (100 * time.nanosecond))
|
||||||
mut t_ms := timeout.sys_milliseconds()
|
mut t_ms := u32(timeout.sys_milliseconds())
|
||||||
C.AcquireSRWLockExclusive(&sem.mtx)
|
C.AcquireSRWLockExclusive(&sem.mtx)
|
||||||
mut res := 0
|
mut res := 0
|
||||||
c = C.atomic_load_u32(&sem.count)
|
c = C.atomic_load_u32(&sem.count)
|
||||||
|
Loading…
Reference in New Issue
Block a user