Skip to content

Replace RuntimeSchedulerClock with HighResTimeClock#51251

Closed
hoxyq wants to merge 3 commits into
react:mainfrom
hoxyq:export-D74246459
Closed

Replace RuntimeSchedulerClock with HighResTimeClock#51251
hoxyq wants to merge 3 commits into
react:mainfrom
hoxyq:export-D74246459

Conversation

@hoxyq

@hoxyq hoxyq commented May 12, 2025

Copy link
Copy Markdown
Contributor

Summary:

Changelog: [Internal]

Replaces RuntimeSchedulerClock, which was an alias for std::chrono::steady_clock with previously defined single timestamp abstraction.

Differential Revision: D74246459

@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: D74246459

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

hoxyq added 2 commits May 16, 2025 10:10
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.

Differential Revision: D72796412
…#51253)

Summary:
Pull Request resolved: #51253

# Changelog: [Internal]

Defines bridging template for `HighResTimeStamp` and `HighResTimeDuration`.

When these values are passed to JavaScript over bridge, they will be converted to [`DOMHighResTimeStamp`](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp).

Also the other way around, when we list `HighResTimeStamp` or `HighResTimeDuration` as a type of TurboModule spec, it will expect number value from JavaScript.

Differential Revision: D74506516
@hoxyq
hoxyq force-pushed the export-D74246459 branch from 842f85c to e752221 Compare May 16, 2025 17:13
…51251)

Summary:
Pull Request resolved: #51251

# Changelog: [Internal]

Replaces `RuntimeSchedulerClock`, which was an alias for `std::chrono::steady_clock` with previously defined single timestamp abstraction.

Reviewed By: rubennorte

Differential Revision: D74246459
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@hoxyq
hoxyq force-pushed the export-D74246459 branch from e752221 to 2b6f147 Compare May 16, 2025 17:21
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 16, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 535150b.

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.

2 participants