Skip to content

Commit f1e235b

Browse files
authored
update metrickit timestamp to reflect framework updates (#9294)
1 parent a531600 commit f1e235b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ - (BOOL)processMetricKitPayload:(MXDiagnosticPayload *)diagnosticPayload
133133
return false;
134134
}
135135

136-
// Time stamp information from MetricKit is only available in begin and end time periods. For now,
137-
// we rely on the current timestamp to set the event timestamp, since this is likely more accurate
138-
// that the 24 hour block we'd otherwise have.
139-
NSTimeInterval beginSecondsSince1970 = [[NSDate date] timeIntervalSince1970];
136+
// MXDiagnosticPayload have both a timeStampBegin and timeStampEnd. Now that these events are
137+
// real-time, both refer to the same time - record both values anyway.
138+
NSTimeInterval beginSecondsSince1970 = [diagnosticPayload.timeStampBegin timeIntervalSince1970];
140139
NSTimeInterval endSecondsSince1970 = [diagnosticPayload.timeStampEnd timeIntervalSince1970];
141140

142141
// Get file path for the active reports directory.

0 commit comments

Comments
 (0)