Skip to content

Commit b2d69a2

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Remove dead telemetryTimePointToSecondsSinceEpoch helper
Summary: `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] Differential Revision: D108012910
1 parent 39c10d2 commit b2d69a2

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

  • packages/react-native/ReactCommon/react/utils

packages/react-native/ReactCommon/react/utils/Telemetry.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,6 @@ DestinationTimePointT clockCast(SourceTimePointT timePoint)
8181
timePoint - sourseClockNow + destinationClockNow);
8282
}
8383

84-
/*
85-
* Returns a number of seconds that passed from the UNIX Epoch starting time
86-
* point to a given time point.
87-
* Also known as POSIX time or UNIX Timestamp.
88-
*/
89-
static inline double telemetryTimePointToSecondsSinceEpoch(TelemetryTimePoint timePoint)
90-
{
91-
auto systemClockTimePoint = clockCast<std::chrono::system_clock::time_point, TelemetryTimePoint>(timePoint);
92-
return (double)std::chrono::duration_cast<std::chrono::microseconds>(systemClockTimePoint.time_since_epoch())
93-
.count() /
94-
1000000.0;
95-
}
96-
9784
/*
9885
* Returns a number of milliseconds that represents the given duration object.
9986
*/

0 commit comments

Comments
 (0)