diff options
| author | 2021-12-03 16:08:20 -0800 | |
|---|---|---|
| committer | 2021-12-03 16:08:20 -0800 | |
| commit | a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89 (patch) | |
| tree | 8feb52b4bd0afa965b0865ef00e5f8739b07d3df /src/core | |
| parent | Merge pull request #7490 from Morph1984/stub-album-save-screenshot (diff) | |
| parent | general: Replace high_resolution_clock with steady_clock (diff) | |
| download | yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.gz yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.xz yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.zip | |
Merge pull request #7489 from Morph1984/steady-clock
general: Replace high_resolution_clock with steady_clock
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 4 | ||||
| -rw-r--r-- | src/core/perf_stats.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 7da1f2969..981b6c996 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -96,7 +96,7 @@ private: | |||
| 96 | 96 | ||
| 97 | bool DecodeOpusData(u32& consumed, u32& sample_count, const std::vector<u8>& input, | 97 | bool DecodeOpusData(u32& consumed, u32& sample_count, const std::vector<u8>& input, |
| 98 | std::vector<opus_int16>& output, u64* out_performance_time) const { | 98 | std::vector<opus_int16>& output, u64* out_performance_time) const { |
| 99 | const auto start_time = std::chrono::high_resolution_clock::now(); | 99 | const auto start_time = std::chrono::steady_clock::now(); |
| 100 | const std::size_t raw_output_sz = output.size() * sizeof(opus_int16); | 100 | const std::size_t raw_output_sz = output.size() * sizeof(opus_int16); |
| 101 | if (sizeof(OpusPacketHeader) > input.size()) { | 101 | if (sizeof(OpusPacketHeader) > input.size()) { |
| 102 | LOG_ERROR(Audio, "Input is smaller than the header size, header_sz={}, input_sz={}", | 102 | LOG_ERROR(Audio, "Input is smaller than the header size, header_sz={}, input_sz={}", |
| @@ -135,7 +135,7 @@ private: | |||
| 135 | return false; | 135 | return false; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | const auto end_time = std::chrono::high_resolution_clock::now() - start_time; | 138 | const auto end_time = std::chrono::steady_clock::now() - start_time; |
| 139 | sample_count = out_sample_count; | 139 | sample_count = out_sample_count; |
| 140 | consumed = static_cast<u32>(sizeof(OpusPacketHeader) + hdr.size); | 140 | consumed = static_cast<u32>(sizeof(OpusPacketHeader) + hdr.size); |
| 141 | if (out_performance_time != nullptr) { | 141 | if (out_performance_time != nullptr) { |
diff --git a/src/core/perf_stats.h b/src/core/perf_stats.h index a2541906f..816202588 100644 --- a/src/core/perf_stats.h +++ b/src/core/perf_stats.h | |||
| @@ -33,7 +33,7 @@ public: | |||
| 33 | explicit PerfStats(u64 title_id_); | 33 | explicit PerfStats(u64 title_id_); |
| 34 | ~PerfStats(); | 34 | ~PerfStats(); |
| 35 | 35 | ||
| 36 | using Clock = std::chrono::high_resolution_clock; | 36 | using Clock = std::chrono::steady_clock; |
| 37 | 37 | ||
| 38 | void BeginSystemFrame(); | 38 | void BeginSystemFrame(); |
| 39 | void EndSystemFrame(); | 39 | void EndSystemFrame(); |
| @@ -87,7 +87,7 @@ private: | |||
| 87 | 87 | ||
| 88 | class SpeedLimiter { | 88 | class SpeedLimiter { |
| 89 | public: | 89 | public: |
| 90 | using Clock = std::chrono::high_resolution_clock; | 90 | using Clock = std::chrono::steady_clock; |
| 91 | 91 | ||
| 92 | void DoSpeedLimiting(std::chrono::microseconds current_system_time_us); | 92 | void DoSpeedLimiting(std::chrono::microseconds current_system_time_us); |
| 93 | 93 | ||