LibCore: Remove deprecated ElapsedTimer::elapsed()

This follows FIXME in the code.
This commit is contained in:
Pavel Shliak 2024-11-23 19:22:31 +04:00 committed by Andreas Kling
parent 69367194a6
commit 442629064b
Notes: github-actions[bot] 2024-11-23 18:21:48 +00:00
3 changed files with 3 additions and 9 deletions

View file

@ -31,12 +31,6 @@ public:
i64 elapsed_milliseconds() const;
AK::Duration elapsed_time() const;
// FIXME: Move callers to elapsed_milliseconds(), remove this.
i64 elapsed() const // milliseconds
{
return elapsed_milliseconds();
}
MonotonicTime const& origin_time() const { return m_origin_time; }
private:

View file

@ -51,7 +51,7 @@ GC::Ref<ClassicScript> ClassicScript::create(ByteString filename, StringView sou
// 10. Let result be ParseScript(source, realm, script).
auto parse_timer = Core::ElapsedTimer::start_new();
auto result = JS::Script::parse(source, realm, script->filename(), script, source_line_number);
dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Parsed {} in {}ms", script->filename(), parse_timer.elapsed());
dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Parsed {} in {}ms", script->filename(), parse_timer.elapsed_milliseconds());
// 11. If result is a list of errors, then:
if (result.is_error()) {
@ -101,7 +101,7 @@ JS::Completion ClassicScript::run(RethrowErrors rethrow_errors, GC::Ptr<JS::Envi
// FIXME: If ScriptEvaluation does not complete because the user agent has aborted the running script, leave evaluationStatus as null.
dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Finished running script {}, Duration: {}ms", filename(), timer.elapsed());
dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Finished running script {}, Duration: {}ms", filename(), timer.elapsed_milliseconds());
}
// 7. If evaluationStatus is an abrupt completion, then:

View file

@ -605,7 +605,7 @@ void ConnectionFromClient::ensure_connection(URL::URL const& url, ::RequestServe
Core::ElapsedTimer timer;
timer.start();
promise->when_resolved([url, timer](auto const& results) -> ErrorOr<void> {
dbgln("ensure_connection::ResolveOnly({}) OK {} entrie(s) in {}ms", url, results->cached_addresses().size(), timer.elapsed());
dbgln("ensure_connection::ResolveOnly({}) OK {} entrie(s) in {}ms", url, results->cached_addresses().size(), timer.elapsed_milliseconds());
return {};
});
promise->when_rejected([url](auto const&) { dbgln("ensure_connection::ResolveOnly({}) rejected", url); });