Created
July 3, 2025 10:15
-
-
Save jamesliu96/2b6d4a5476f62c1e5eca5747eeb3ce5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function timeOffset(url) { | |
| const t1 = performance.now() + performance.timeOrigin; | |
| const t2 = await (await fetch(url)).text(); | |
| const t3 = t2; | |
| const t4 = performance.now() + performance.timeOrigin; | |
| return ((t2 - t1) + (t3 - t4)) / 2; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment