diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2023-03-17 19:50:39 +0100 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-05-24 23:18:07 +0200 |
commit | fc5cab5c2180b4ba8efcf74b937c2b7e26dad781 (patch) | |
tree | 59cdd3836d2db037551e7e970d7b64e970814404 /Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp | |
parent | b2e7b8cdffa2297b335698677f5c0434dbf92e75 (diff) | |
download | serenity-fc5cab5c2180b4ba8efcf74b937c2b7e26dad781.zip |
Everywhere: Use MonotonicTime instead of Duration
This is easily identifiable by anyone who uses Duration::now_monotonic,
and any downstream users of that data.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp b/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp index 9abb42dc59..cafdded844 100644 --- a/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp +++ b/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp @@ -329,7 +329,7 @@ ExecuteScriptResultSerialized execute_async_script(Web::Page& page, DeprecatedSt auto* window = page.top_level_browsing_context().active_window(); auto& realm = window->realm(); auto& vm = window->vm(); - auto start = Duration::now_monotonic(); + auto start = MonotonicTime::now(); // 4. Let promise be a new Promise. auto promise = JS::Promise::create(realm); @@ -383,7 +383,7 @@ ExecuteScriptResultSerialized execute_async_script(Web::Page& page, DeprecatedSt vm.custom_data()->spin_event_loop_until([&] { if (script_promise.state() != JS::Promise::State::Pending) return true; - if (timeout.has_value() && (Duration::now_monotonic() - start) > Duration::from_seconds(static_cast<i64>(*timeout))) + if (timeout.has_value() && (MonotonicTime::now() - start) > Duration::from_seconds(static_cast<i64>(*timeout))) return true; return false; }); |