From c80b0407cf00951fefee037e7d5fe78e9b2d3684 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Wed, 10 Jun 2026 09:17:52 -0700 Subject: [PATCH] Remove dead telemetryTimePointToSecondsSinceEpoch helper Summary: X-link: https://github.com/facebook/react-native/pull/57134 `telemetryTimePointToSecondsSinceEpoch()` in `ReactCommon/react/utils/Telemetry.h` was a `static inline` helper that converted a `TelemetryTimePoint` to seconds since the UNIX epoch, but it had no callers anywhere. This is a pure dead-code removal. The sibling `clockCast` helper it used is left in place (it remains part of the public API surface). Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D108012910 fbshipit-source-id: 5361ef87aaae3c676b542059c0a9d6475b33de45 --- .../ReactCommon/react/utils/Telemetry.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/react-native/ReactCommon/react/utils/Telemetry.h b/packages/react-native/ReactCommon/react/utils/Telemetry.h index ac4c6a1eec8..d7ebf2b0e82 100644 --- a/packages/react-native/ReactCommon/react/utils/Telemetry.h +++ b/packages/react-native/ReactCommon/react/utils/Telemetry.h @@ -81,19 +81,6 @@ DestinationTimePointT clockCast(SourceTimePointT timePoint) timePoint - sourseClockNow + destinationClockNow); } -/* - * Returns a number of seconds that passed from the UNIX Epoch starting time - * point to a given time point. - * Also known as POSIX time or UNIX Timestamp. - */ -static inline double telemetryTimePointToSecondsSinceEpoch(TelemetryTimePoint timePoint) -{ - auto systemClockTimePoint = clockCast(timePoint); - return (double)std::chrono::duration_cast(systemClockTimePoint.time_since_epoch()) - .count() / - 1000000.0; -} - /* * Returns a number of milliseconds that represents the given duration object. */