mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-20 09:21:55 +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:
parent
0f168d9ca2
commit
679fe00d10
Notes:
sideshowbarker
2024-07-17 08:45:34 +09:00
Author: https://github.com/tcl3
Commit: 679fe00d10
Pull-request: https://github.com/SerenityOS/serenity/pull/23353
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 13 additions and 8 deletions
|
@ -78,7 +78,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// 0: got ttl exhausted response
|
||||
// -1: error or no response
|
||||
auto try_reach_host = [&](int ttl) -> ErrorOr<int> {
|
||||
Core::ElapsedTimer m_timer { true };
|
||||
Core::ElapsedTimer m_timer { Core::TimerType::Precise };
|
||||
auto ttl_number = ByteString::number(ttl);
|
||||
for (auto i = 0; i < max_retries; i++) {
|
||||
icmp_request request {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue