diff --git a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.cpp b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.cpp index 865300f0d2..f11cbd8ef1 100644 --- a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.cpp +++ b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.cpp @@ -52,7 +52,7 @@ JS::GCPtr Performance::timing() double Performance::time_origin() const { - return static_cast(m_timer.origin_time().milliseconds()); + return static_cast(m_timer.origin_time().nanoseconds()) / 1e6; } // https://w3c.github.io/user-timing/#mark-method diff --git a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h index cdda943ae8..213dbeeef3 100644 --- a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h +++ b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h @@ -21,7 +21,7 @@ class Performance final : public DOM::EventTarget { public: virtual ~Performance() override; - double now() const { return static_cast(m_timer.elapsed()); } + double now() const { return static_cast(m_timer.elapsed_time().to_nanoseconds()) / 1e6; } double time_origin() const; JS::GCPtr timing();