We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a52d3b commit 4a51e42Copy full SHA for 4a51e42
Sources/Observability/AutoInstrumentation/Launch/LaunchMeter.swift
@@ -167,9 +167,14 @@ public final class LaunchMeter {
167
state.lastLaunchDuration = currentUptime - (state.lastWillEnterForegroundTime ?? 0.0)
168
state.launchType = .warm
169
170
+ guard
171
+ let lastWillEnterForegroundDate = state.lastWillEnterForegroundDate,
172
+ let launchEndUpDate = state.launchEndUpDate
173
+ else { return }
174
+
175
let statistics = LaunchStats(
- startTime: state.lastWillEnterForegroundDate ?? Date(),
- endTime: state.launchEndUpDate ?? Date(),
176
+ startTime: lastWillEnterForegroundDate,
177
+ endTime: launchEndUpDate,
178
elapsedTime: state.lastLaunchDuration,
179
launchType: state.launchType
180
)
0 commit comments