Merge pull request #7489 from Morph1984/steady-clock

general: Replace high_resolution_clock with steady_clock
This commit is contained in:
bunnei 2021-12-03 16:08:20 -08:00 committed by GitHub
commit a2fb5a13b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 13 deletions

View file

@ -96,7 +96,7 @@ private:
bool DecodeOpusData(u32& consumed, u32& sample_count, const std::vector<u8>& input,
std::vector<opus_int16>& output, u64* out_performance_time) const {
const auto start_time = std::chrono::high_resolution_clock::now();
const auto start_time = std::chrono::steady_clock::now();
const std::size_t raw_output_sz = output.size() * sizeof(opus_int16);
if (sizeof(OpusPacketHeader) > input.size()) {
LOG_ERROR(Audio, "Input is smaller than the header size, header_sz={}, input_sz={}",
@ -135,7 +135,7 @@ private:
return false;
}
const auto end_time = std::chrono::high_resolution_clock::now() - start_time;
const auto end_time = std::chrono::steady_clock::now() - start_time;
sample_count = out_sample_count;
consumed = static_cast<u32>(sizeof(OpusPacketHeader) + hdr.size);
if (out_performance_time != nullptr) {

View file

@ -33,7 +33,7 @@ public:
explicit PerfStats(u64 title_id_);
~PerfStats();
using Clock = std::chrono::high_resolution_clock;
using Clock = std::chrono::steady_clock;
void BeginSystemFrame();
void EndSystemFrame();
@ -87,7 +87,7 @@ private:
class SpeedLimiter {
public:
using Clock = std::chrono::high_resolution_clock;
using Clock = std::chrono::steady_clock;
void DoSpeedLimiting(std::chrono::microseconds current_system_time_us);