mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
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
This commit is contained in:
1 parent
9e3a0df61e
commit
c80b0407cf
1 file changed
-13
@@ -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<std::chrono::system_clock::time_point, TelemetryTimePoint>(timePoint);
|
||||
return (double)std::chrono::duration_cast<std::chrono::microseconds>(systemClockTimePoint.time_since_epoch())
|
||||
.count() /
|
||||
1000000.0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a number of milliseconds that represents the given duration object.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user