Files
react-native/Libraries/Core
Yoonseok Ko d9ab5e81cf A bug fix - the undefined behavior of idleCallbacks's timeRemaining.
Summary:
## Changelog:

[Android] [Fixed] - Fix a bug that returns a random number from callback argument `timeRemaining` of `idleCallbacks` registered by `requestIdleCallbacks`.

`global.performance.now()` returns a time from an unknown origin, while `frameTime` is epoch time. Thus, `global.performance.now() - frameTime` is just a random number rather than an elapsed time from the frame start time.

As a simple solution, I would suggest to use `Date.now()`.
Its resolution is lower than `frameTime` due to the security issue in JavaScript VM. So, it loses some precision, but, at least, it is not wrong.

Reviewed By: javache

Differential Revision: D40941461

fbshipit-source-id: b0094e181b97a844d133a9268fe48cd8c8fadfda
2022-11-03 05:19:36 -07:00
..
2022-09-30 14:28:48 -07:00
2022-10-17 12:40:57 -07:00
2022-09-30 14:28:48 -07:00
2022-09-30 14:28:48 -07:00