1
0
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:
Delyan Angelov 2023-07-31 11:18:12 +03:00
parent 2cd5b8a86d
commit 367289a1f1
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -176,7 +176,7 @@ pub fn (mut sem Semaphore) timed_wait(timeout time.Duration) bool {
C.GetSystemTimeAsFileTime(&ft_start)
time_end := ((u64(ft_start.dwHighDateTime) << 32) | ft_start.dwLowDateTime) +
u64(timeout / (100 * time.nanosecond))
mut t_ms := timeout.sys_milliseconds()
mut t_ms := u32(timeout.sys_milliseconds())
C.AcquireSRWLockExclusive(&sem.mtx)
mut res := 0
c = C.atomic_load_u32(&sem.count)