| ... | ... | @@ -2864,7 +2864,8 @@ fn nowWindows(userdata: ?*anyopaque, clock: Io.Clock) Io.Clock.Error!Io.Timestam |
| 2864 | 2864 | .real => { |
| 2865 | 2865 | // RtlGetSystemTimePrecise() has a granularity of 100 nanoseconds |
| 2866 | 2866 | // and uses the NTFS/Windows epoch, which is 1601-01-01. |
| 2867 | | return .{ .nanoseconds = @as(i96, windows.ntdll.RtlGetSystemTimePrecise()) * 100 }; |
| 2867 | const epoch_ns = std.time.epoch.windows * std.time.ns_per_s; |
| 2868 | return .{ .nanoseconds = @as(i96, windows.ntdll.RtlGetSystemTimePrecise()) * 100 + epoch_ns }; |
| 2868 | 2869 | }, |
| 2869 | 2870 | .awake, .boot => { |
| 2870 | 2871 | // QPC on windows doesn't fail on >= XP/2000 and includes time suspended. |