File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ function getBrowserTimeOrigin(): number | undefined {
8989 return undefined ;
9090 }
9191
92- // TOOD: We should probably set a much tighter threshold here as skew can already happen within just a few minutes.
93- const threshold = 3_600_000 ; // 1 hour in milliseconds
92+ const threshold = 300_000 ; // 5 minutes in milliseconds
9493 const performanceNow = performance . now ( ) ;
9594 const dateNow = Date . now ( ) ;
9695
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ async function getFreshPerformanceTimeOrigin() {
77 return timeModule . browserPerformanceTimeOrigin ( ) ;
88}
99
10- const RELIABLE_THRESHOLD_MS = 3_600_000 ;
10+ const RELIABLE_THRESHOLD_MS = 300_000 ;
1111
1212describe ( 'browserPerformanceTimeOrigin' , ( ) => {
1313 it ( 'returns `performance.timeOrigin` if it is available and reliable' , async ( ) => {
You can’t perform that action at this time.
0 commit comments