File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/react-native-web/src/vendor/react-native/JSEventLoopWatchdog Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11
11
'use strict' ;
12
12
13
13
import infoLog from '../infoLog' ;
14
- import performanceNow from 'fbjs/lib/performanceNow' ;
15
14
16
15
type Handler = {
17
16
onIterate ?: ( ) => void ,
@@ -39,7 +38,7 @@ const JSEventLoopWatchdog = {
39
38
totalStallTime = 0 ;
40
39
stallCount = 0 ;
41
40
longestStall = 0 ;
42
- lastInterval = performanceNow ( ) ;
41
+ lastInterval = window . performance . now ( ) ;
43
42
} ,
44
43
addHandler : function ( handler : Handler ) {
45
44
handlers . push ( handler ) ;
@@ -50,9 +49,9 @@ const JSEventLoopWatchdog = {
50
49
return;
51
50
}
52
51
installed = true ;
53
- lastInterval = performanceNow ( ) ;
52
+ lastInterval = window . performance . now ( ) ;
54
53
function iteration ( ) {
55
- const now = performanceNow ( ) ;
54
+ const now = window . performance . now ( ) ;
56
55
const busyTime = now - lastInterval ;
57
56
if ( busyTime >= thresholdMS ) {
58
57
const stallTime = busyTime - thresholdMS ;
You can’t perform that action at this time.
0 commit comments