mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
Update comments in src/shims/time.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ fn QueryPerformanceCounter(&mut self, lpPerformanceCount_op: OpTy<'tcx, Tag>) ->
|
||||
this.assert_target_os("windows", "QueryPerformanceCounter");
|
||||
this.check_no_isolation("QueryPerformanceCounter")?;
|
||||
|
||||
// QPC uses a hardware counter as its basis.
|
||||
// QueryPerformanceCounter uses a hardware counter as its basis.
|
||||
// Miri will emulate a counter with a resolution of 1 nanosecond.
|
||||
let duration = Instant::now().duration_since(this.machine.time_anchor);
|
||||
let qpc = i64::try_from(duration.as_nanos())
|
||||
|
||||
Reference in New Issue
Block a user