Skip to content

Define HighResTimeStamp, HighResTimeDuration, HighResTimeClock#51254

Closed
hoxyq wants to merge 1 commit into
react:mainfrom
hoxyq:export-D72796412
Closed

Define HighResTimeStamp, HighResTimeDuration, HighResTimeClock#51254
hoxyq wants to merge 1 commit into
react:mainfrom
hoxyq:export-D72796412

Conversation

@hoxyq

@hoxyq hoxyq commented May 12, 2025

Copy link
Copy Markdown
Contributor

Summary:

Changelog: [Internal]

Defines single timestamp abstraction that will be used in C++ layer of React Native core:
Key primitives include:

  • HighResTimeStamp: A class representing a specific point in time with high precision.
  • HighResTimeDuration: A class representing a duration of time with high precision.
  • HighResTimeClock: A class providing a monotonic clock that won't be adjusted.

Right now, all these just encapsulate std::chrono::steady_clock with no extra custom logic. We might revisit this in a future, once we decide to add support for Performance.timeOrigin.

This diff also adds a README.md documentation file with a brief summary of the react/timing module.

Differential Revision: D72796412

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels May 12, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72796412

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72796412

@hoxyq
hoxyq force-pushed the export-D72796412 branch 2 times, most recently from d883108 to 1cd3045 Compare May 12, 2025 21:35
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72796412

@hoxyq
hoxyq force-pushed the export-D72796412 branch from 1cd3045 to 940827b Compare May 15, 2025 09:49
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72796412

@hoxyq
hoxyq force-pushed the export-D72796412 branch from 940827b to c9a52a2 Compare May 15, 2025 11:14
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72796412

@hoxyq
hoxyq force-pushed the export-D72796412 branch 2 times, most recently from bcda99d to 5b698ec Compare May 16, 2025 17:13
Summary:
Pull Request resolved: #51254

# Changelog: [Internal]

Defines single timestamp abstraction that will be used in C++ layer of React Native core:
Key primitives include:
- `HighResTimeStamp`: A class representing a specific point in time with high precision.
- `HighResDuration`: A class representing a duration of time with high precision.

Right now, all these just encapsulate `std::chrono::steady_clock` with no extra custom logic. We might revisit this in a future, once we decide to add support for [`Performance.timeOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).

This diff also adds a `README.md` documentation file with a brief summary of the `react/timing` module.

Reviewed By: rubennorte

Differential Revision: D72796412
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72796412

@hoxyq
hoxyq force-pushed the export-D72796412 branch from 5b698ec to e9fcdf3 Compare May 16, 2025 17:20
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 16, 2025
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @hoxyq in a882f19

When will my fix make it into a release? | How to file a pick request?

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in a882f19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants