1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:47:35 +00:00

LibCore+Utilities: Replace ElapsedTimer precise flag with an enum

Previously, `true` was passed into the ElapsedTimer constructor if a
precise timer was required. We now use an enum to more explicitly
specify whether we would like a precise or a coarse timer.
This commit is contained in:
Tim Ledbetter 2024-02-26 17:52:03 +00:00 committed by Andrew Kaster
parent 0f168d9ca2
commit 679fe00d10
5 changed files with 13 additions and 8 deletions

View file

@ -39,7 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
}
auto loader = maybe_loader.release_value();
Core::ElapsedTimer sample_timer { true };
Core::ElapsedTimer sample_timer { Core::TimerType::Precise };
i64 total_loader_time = 0;
int remaining_samples = sample_count > 0 ? sample_count : NumericLimits<int>::max();
unsigned total_loaded_samples = 0;