diff options
| author | bors <bors@rust-lang.org> | 2020-03-16 02:52:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-16 02:52:47 +0000 |
| commit | 97eda01bb79de1e0a52994f52cfb5a527687f505 (patch) | |
| tree | e672e08f84632cbef14a7aec025e360f907b4f2c /src/libstd/sys | |
| parent | 45ebd5808afd3df7ba842797c0fcd4447ddf30fb (diff) | |
| parent | 6b50a4cebb55db54104a071c74f2fc74de17b6af (diff) | |
| download | rust-97eda01bb79de1e0a52994f52cfb5a527687f505.tar.gz rust-97eda01bb79de1e0a52994f52cfb5a527687f505.zip | |
Auto merge of #70034 - Dylan-DPC:rollup-5yg771j, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #69686 (Use `pprust` to print attributes in rustdoc) - #69858 (std: on Windows, use GetSystemTimePreciseAsFileTime if it is available) - #69917 (Cleanup E0412 and E0422) - #69964 (Add Node.js to PR CI image) - #69992 (Block version-specific docs from search engines) - #69995 (Add more context to the literal overflow message) - #69998 (Add long error explanation for E0634) - #70014 (Small fixes in rustdoc book) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/windows/c.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/windows/time.rs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index d7e1a801030..7f93ef87953 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -1045,6 +1045,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, diff --git a/src/libstd/sys/windows/time.rs b/src/libstd/sys/windows/time.rs index 86667ca7ab2..900260169c7 100644 --- a/src/libstd/sys/windows/time.rs +++ b/src/libstd/sys/windows/time.rs @@ -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 } } |
