We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2142a8c commit eafff80Copy full SHA for eafff80
1 file changed
packages/react-native-gesture-handler/src/components/GestureHandlerButton.web.tsx
@@ -58,7 +58,7 @@ export const ButtonComponent = ({
58
clearTimeout(pressOutTimer.current);
59
pressOutTimer.current = null;
60
}
61
- pressInTimestamp.current = Date.now();
+ pressInTimestamp.current = performance.now();
62
setCurrentDuration(pressAndHoldAnimationDuration);
63
setPressed(true);
64
@@ -68,7 +68,7 @@ export const ButtonComponent = ({
68
if (pressOutTimer.current != null) {
69
70
71
- const elapsed = Date.now() - pressInTimestamp.current;
+ const elapsed = performance.now() - pressInTimestamp.current;
72
73
if (elapsed >= pressAndHoldAnimationDuration) {
74
0 commit comments