Skip to content

Add support for 'std::time::Instant' in Windows #1294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 3, 2020

Conversation

JOE1994
Copy link
Contributor

@JOE1994 JOE1994 commented Apr 2, 2020

Add support for creating std::time::Instant in Windows

Includes shims for QueryPerformanceCounter & QueryPerformanceFrequency in Windows, which are both called in Windows when std::time::Instant is created.

Windows docs page "Acquiring high-resolution time stamps" was helpful in learning how QueryPerformanceCounter & QueryPerformanceFrequency work.

closes #1291

@RalfJung
Copy link
Member

RalfJung commented Apr 3, 2020

Thanks a lot, this looks good!
@bors r+

@bors
Copy link
Contributor

bors commented Apr 3, 2020

📌 Commit d5de67a has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Apr 3, 2020

⌛ Testing commit d5de67a with merge 0e8a1a4...

@bors
Copy link
Contributor

bors commented Apr 3, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing 0e8a1a4 to master...

@bors bors merged commit 0e8a1a4 into rust-lang:master Apr 3, 2020
@JOE1994 JOE1994 deleted the windows_instant branch April 3, 2020 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: cannot create Instants
3 participants