Formalize event timestamps and propagate from host platform to JS#55878
Closed
rubennorte wants to merge 1 commit intofacebook:mainfrom
Closed
Formalize event timestamps and propagate from host platform to JS#55878rubennorte wants to merge 1 commit intofacebook:mainfrom
rubennorte wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94669354. |
3789181 to
1784a36
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Mar 4, 2026
…cebook#55878) Summary: Pull Request resolved: facebook#55878 Changelog: [General][Fixed] - Fix event timestamp propagation from host platforms to JS This adds event timestamps as a first class concept in Fabric during dispatch, and uses the new methods to dispatch events to pass the values from the host platform (Android and iOS). If the value isn't pass, the current timestamp at the time of dispatch is used (which is close enough). This fixes several problems: 1. Makes event timestamps account for native event dispatch delay. 2. Normalizes event timestamps across APIs (event timestamp property, Event Timing API information, etc.). NOTE: I had to implement clock correction on iOS because the timing we get from UITouch objects doesn't use the same clock as we do in C++. Reviewed By: javache, NickGerleman Differential Revision: D94669354
1784a36 to
532f7ce
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Mar 4, 2026
…cebook#55878) Summary: Pull Request resolved: facebook#55878 Changelog: [General][Fixed] - Fix event timestamp propagation from host platforms to JS This adds event timestamps as a first class concept in Fabric during dispatch, and uses the new methods to dispatch events to pass the values from the host platform (Android and iOS). If the value isn't pass, the current timestamp at the time of dispatch is used (which is close enough). This fixes several problems: 1. Makes event timestamps account for native event dispatch delay. 2. Normalizes event timestamps across APIs (event timestamp property, Event Timing API information, etc.). NOTE: I had to implement clock correction on iOS because the timing we get from UITouch objects doesn't use the same clock as we do in C++. Reviewed By: javache, NickGerleman Differential Revision: D94669354
…cebook#55878) Summary: Pull Request resolved: facebook#55878 Changelog: [General][Fixed] - Fix event timestamp propagation from host platforms to JS This adds event timestamps as a first class concept in Fabric during dispatch, and uses the new methods to dispatch events to pass the values from the host platform (Android and iOS). If the value isn't pass, the current timestamp at the time of dispatch is used (which is close enough). This fixes several problems: 1. Makes event timestamps account for native event dispatch delay. 2. Normalizes event timestamps across APIs (event timestamp property, Event Timing API information, etc.). NOTE: I had to implement clock correction on iOS because the timing we get from UITouch objects doesn't use the same clock as we do in C++. Reviewed By: javache, NickGerleman Differential Revision: D94669354
532f7ce to
1149d6c
Compare
Collaborator
|
This pull request was successfully merged by @rubennorte in aa51746 When will my fix make it into a release? | How to file a pick request? |
|
This pull request has been merged in aa51746. |
zoontek
pushed a commit
to zoontek/react-native
that referenced
this pull request
Mar 9, 2026
…cebook#55878) Summary: Pull Request resolved: facebook#55878 Changelog: [General][Fixed] - Fix event timestamp propagation from host platforms to JS This adds event timestamps as a first class concept in Fabric during dispatch, and uses the new methods to dispatch events to pass the values from the host platform (Android and iOS). If the value isn't pass, the current timestamp at the time of dispatch is used (which is close enough). This fixes several problems: 1. Makes event timestamps account for native event dispatch delay. 2. Normalizes event timestamps across APIs (event timestamp property, Event Timing API information, etc.). NOTE: I had to implement clock correction on iOS because the timing we get from UITouch objects doesn't use the same clock as we do in C++. Reviewed By: javache, NickGerleman Differential Revision: D94669354 fbshipit-source-id: 945ce5dd2d2f44f2106e631854de40a109a6cb81
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Changelog: [General][Fixed] - Fix event timestamp propagation from host platforms to JS
This adds event timestamps as a first class concept in Fabric during dispatch, and uses the new methods to dispatch events to pass the values from the host platform (Android and iOS). If the value isn't pass, the current timestamp at the time of dispatch is used (which is close enough).
This fixes several problems:
NOTE: I had to implement clock correction on iOS because the timing we get from UITouch objects doesn't use the same clock as we do in C++.
Differential Revision: D94669354