mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibWeb: Return milliseconds from unsafe_shared_current_time()
This was incorrectly changed to returning seconds in fc5cab5, which
meant the time passed to the callbacks of requestAnimationFrame() was
wrong.
This commit is contained in:
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/1d999fa780 Pull-request: https://github.com/SerenityOS/serenity/pull/23069 Issue: https://github.com/SerenityOS/serenity/issues/23004
@@ -55,7 +55,8 @@ DOMHighResTimeStamp coarsened_shared_current_time(bool cross_origin_isolated_cap
|
||||
DOMHighResTimeStamp unsafe_shared_current_time()
|
||||
{
|
||||
// The unsafe shared current time must return the current value of the shared monotonic clock.
|
||||
return MonotonicTime::now().truncated_seconds();
|
||||
// Note: This is in milliseconds (stored as a double).
|
||||
return MonotonicTime::now().nanoseconds() / 1.0e6;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user