Skip to content

Define HighResTimeStamp, HighResTimeDuration, HighResTimeClock #51254

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented May 12, 2025

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
Contributor

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

hoxyq added a commit to hoxyq/react-native that referenced this pull request May 12, 2025
…ook#51254)

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`](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
@hoxyq hoxyq force-pushed the export-D72796412 branch from 18481d5 to 45f4d8d Compare May 12, 2025 17:15
@facebook-github-bot
Copy link
Contributor

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

hoxyq added a commit to hoxyq/react-native that referenced this pull request May 12, 2025
…ook#51254)

Summary:
Pull Request resolved: facebook#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.
- `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`](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
@hoxyq hoxyq force-pushed the export-D72796412 branch from 45f4d8d to d883108 Compare May 12, 2025 17:19
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 12, 2025
…ook#51254)

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`](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
@hoxyq hoxyq force-pushed the export-D72796412 branch from d883108 to 1cd3045 Compare May 12, 2025 21:35
@facebook-github-bot
Copy link
Contributor

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

hoxyq added a commit to hoxyq/react-native that referenced this pull request May 14, 2025
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.
- `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
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 14, 2025
Summary:
Pull Request resolved: facebook#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
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 15, 2025
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.
- `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
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 15, 2025
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.
- `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
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 15, 2025
Summary:
Pull Request resolved: facebook#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
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 15, 2025
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.
- `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
@hoxyq hoxyq force-pushed the export-D72796412 branch from 1cd3045 to 940827b Compare May 15, 2025 09:49
@facebook-github-bot
Copy link
Contributor

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

hoxyq added a commit to hoxyq/react-native that referenced this pull request May 15, 2025
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.
- `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
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 15, 2025
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.
- `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
@hoxyq hoxyq force-pushed the export-D72796412 branch from 940827b to c9a52a2 Compare May 15, 2025 11:14
Summary:
Pull Request resolved: facebook#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
Contributor

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

@hoxyq hoxyq force-pushed the export-D72796412 branch from c9a52a2 to bcda99d Compare May 15, 2025 11:18
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 p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants