RageTimer bug fix

Fast data types are good for audio processing, but not so much for timekeeping. This PR should resolve a number of smaller issues.
This commit is contained in:
sukibaby
2024-12-04 09:41:26 -08:00
committed by teejusb
parent ffc576a210
commit 7b45a5f599
5 changed files with 22 additions and 26 deletions
+4 -4
View File
@@ -682,12 +682,12 @@ void LockMutex::Unlock()
mutex.Unlock();
constexpr uint_fast64_t THRESHOLD_USEC = 15000;
constexpr uint64_t THRESHOLD_USEC = 15000;
if (file && locked_at != FAST_ULL_MAX)
if (file && locked_at != UINT64_MAX)
{
const uint_fast64_t current_usecs = RageTimer::GetTimeSinceStartMicroseconds();
const uint_fast64_t dur_usecs = current_usecs - locked_at;
const uint64_t current_usecs = RageTimer::GetTimeSinceStartMicroseconds();
const uint64_t dur_usecs = current_usecs - locked_at;
if (dur_usecs > THRESHOLD_USEC)
LOG->Trace("Lock at %s:%i took %llu microseconds", file, line, dur_usecs);