Use GetSystemTimePreciseAsFileTime if it is available
This commit is contained in:
parent
3dbade652e
commit
0605abe3bb
@ -1044,6 +1044,10 @@ compat_fn! {
|
||||
_dwBufferSize: DWORD) -> BOOL {
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED as DWORD); 0
|
||||
}
|
||||
pub fn GetSystemTimePreciseAsFileTime(lpSystemTimeAsFileTime: LPFILETIME)
|
||||
-> () {
|
||||
GetSystemTimeAsFileTime(lpSystemTimeAsFileTime)
|
||||
}
|
||||
pub fn SleepConditionVariableSRW(ConditionVariable: PCONDITION_VARIABLE,
|
||||
SRWLock: PSRWLOCK,
|
||||
dwMilliseconds: DWORD,
|
||||
|
@ -74,7 +74,7 @@ impl SystemTime {
|
||||
pub fn now() -> SystemTime {
|
||||
unsafe {
|
||||
let mut t: SystemTime = mem::zeroed();
|
||||
c::GetSystemTimeAsFileTime(&mut t.t);
|
||||
c::GetSystemTimePreciseAsFileTime(&mut t.t);
|
||||
t
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user