diff options
| author | 2022-02-01 18:34:31 -0700 | |
|---|---|---|
| committer | 2022-02-01 18:34:31 -0700 | |
| commit | 50e9ba34b49a5440487529bece8cbf15b78f8df0 (patch) | |
| tree | 48fc259e944baa16a401e52a25eb4eb6ac236d63 /src/common/x64/native_clock.cpp | |
| parent | Merge pull request #7831 from lioncash/motion (diff) | |
| parent | common: wall_clock: Check precision against the emulated CPU and CNTFRQ (diff) | |
| download | yuzu-50e9ba34b49a5440487529bece8cbf15b78f8df0.tar.gz yuzu-50e9ba34b49a5440487529bece8cbf15b78f8df0.tar.xz yuzu-50e9ba34b49a5440487529bece8cbf15b78f8df0.zip | |
Merge pull request #7809 from Morph1984/clock-constants
common: wall_clock: Utilize constants for ms, us, and ns ratios
Diffstat (limited to 'src/common/x64/native_clock.cpp')
| -rw-r--r-- | src/common/x64/native_clock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 82ee2c8a1..91b842829 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp | |||
| @@ -47,9 +47,9 @@ NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequen | |||
| 47 | _mm_mfence(); | 47 | _mm_mfence(); |
| 48 | time_point.inner.last_measure = __rdtsc(); | 48 | time_point.inner.last_measure = __rdtsc(); |
| 49 | time_point.inner.accumulated_ticks = 0U; | 49 | time_point.inner.accumulated_ticks = 0U; |
| 50 | ns_rtsc_factor = GetFixedPoint64Factor(1000000000, rtsc_frequency); | 50 | ns_rtsc_factor = GetFixedPoint64Factor(NS_RATIO, rtsc_frequency); |
| 51 | us_rtsc_factor = GetFixedPoint64Factor(1000000, rtsc_frequency); | 51 | us_rtsc_factor = GetFixedPoint64Factor(US_RATIO, rtsc_frequency); |
| 52 | ms_rtsc_factor = GetFixedPoint64Factor(1000, rtsc_frequency); | 52 | ms_rtsc_factor = GetFixedPoint64Factor(MS_RATIO, rtsc_frequency); |
| 53 | clock_rtsc_factor = GetFixedPoint64Factor(emulated_clock_frequency, rtsc_frequency); | 53 | clock_rtsc_factor = GetFixedPoint64Factor(emulated_clock_frequency, rtsc_frequency); |
| 54 | cpu_rtsc_factor = GetFixedPoint64Factor(emulated_cpu_frequency, rtsc_frequency); | 54 | cpu_rtsc_factor = GetFixedPoint64Factor(emulated_cpu_frequency, rtsc_frequency); |
| 55 | } | 55 | } |