mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00: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:
parent
38855de829
commit
1d999fa780
3 changed files with 6 additions and 5 deletions
|
@ -7,8 +7,8 @@ list instanceof PerformanceObserverEntryList: true
|
||||||
allEntries instanceof Array: true
|
allEntries instanceof Array: true
|
||||||
allEntries.length === 3: true
|
allEntries.length === 3: true
|
||||||
allEntries[0] === startMark: true
|
allEntries[0] === startMark: true
|
||||||
allEntries[1] === endMark: true
|
allEntries[1] === measureMark: true
|
||||||
allEntries[2] === measureMark: true
|
allEntries[2] === endMark: true
|
||||||
markEntries instanceof Array: true
|
markEntries instanceof Array: true
|
||||||
markEntries.length === 2: true
|
markEntries.length === 2: true
|
||||||
markEntries[0] === startMark: true
|
markEntries[0] === startMark: true
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
printlnBuffered(`allEntries instanceof Array: ${allEntries instanceof Array}`);
|
printlnBuffered(`allEntries instanceof Array: ${allEntries instanceof Array}`);
|
||||||
printlnBuffered(`allEntries.length === 3: ${allEntries.length === 3}`);
|
printlnBuffered(`allEntries.length === 3: ${allEntries.length === 3}`);
|
||||||
printlnBuffered(`allEntries[0] === startMark: ${allEntries[0] === startMark}`);
|
printlnBuffered(`allEntries[0] === startMark: ${allEntries[0] === startMark}`);
|
||||||
printlnBuffered(`allEntries[1] === endMark: ${allEntries[1] === endMark}`);
|
printlnBuffered(`allEntries[1] === measureMark: ${allEntries[1] === measureMark}`);
|
||||||
printlnBuffered(`allEntries[2] === measureMark: ${allEntries[2] === measureMark}`);
|
printlnBuffered(`allEntries[2] === endMark: ${allEntries[2] === endMark}`);
|
||||||
|
|
||||||
const markEntries = list.getEntriesByType("mark");
|
const markEntries = list.getEntriesByType("mark");
|
||||||
printlnBuffered(`markEntries instanceof Array: ${markEntries instanceof Array}`);
|
printlnBuffered(`markEntries instanceof Array: ${markEntries instanceof Array}`);
|
||||||
|
|
|
@ -55,7 +55,8 @@ DOMHighResTimeStamp coarsened_shared_current_time(bool cross_origin_isolated_cap
|
||||||
DOMHighResTimeStamp unsafe_shared_current_time()
|
DOMHighResTimeStamp unsafe_shared_current_time()
|
||||||
{
|
{
|
||||||
// The unsafe shared current time must return the current value of the shared monotonic clock.
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue