Skip to content

Use unix epoch timestamps #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2022
Merged

Use unix epoch timestamps #71

merged 1 commit into from
Mar 30, 2022

Conversation

oblador
Copy link
Owner

@oblador oblador commented Mar 30, 2022

In React Native 0.68 the Performance.now() implementation on both iOS and Android changed to use unix epoch timestamps instead of a monotonic clock in facebook/react-native#32695.

This is clearly inferior for the purposes of performance metrics as it risks skewing durations, but it's more important to keep the native marks in sync with the RN implementation which this PR aims to do. This means this is a breaking change only compatible with RN >=0.68.

@oblador oblador merged commit 390e91c into master Mar 30, 2022
@oblador oblador deleted the epoch-timestamps branch March 30, 2022 13:49
opayen pushed a commit to opayen/react-native-performance that referenced this pull request Sep 16, 2022
oblador added a commit that referenced this pull request Sep 21, 2022
* Revert "Use unix epoch timestamps (#71)"

This reverts commit 390e91c

* Update Podfile

* Upgrade to React Native 0.68.3

* Use RN's code to get the timestamp

* Use monotonic clock in RNPerformance

* Update README.md

* Cleanup

* Remove empty line

* Fix yarn.lock

* Update lockfiles

* Force singular version of node types

* Bump TS/typings and skip lib check

Co-authored-by: Olivier Payen <olivier.payen@klarna.com>
Co-authored-by: Joel Arvidsson <joel.arvidsson@klarna.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant