Skip to content

Commit

Permalink
fixup! fix: compilation without UIKit
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Jul 1, 2022
1 parent 2123571 commit 77cb781
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Sentry/SentryFramesTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ - (void)resetFrames
atomic_store_explicit(&_slowFrames, 0, SentryFramesMemoryOrder);

self.previousFrameTimestamp = SentryPreviousFrameInitialValue;
# if SENTRY_TARGET_PROFILING_SUPPORTED
[self resetProfilingTimestamps];
# endif // SENTRY_TARGET_PROFILING_SUPPORTED
}

# if SENTRY_TARGET_PROFILING_SUPPORTED
Expand Down Expand Up @@ -120,6 +122,7 @@ - (void)displayLinkCallback
= 1 / (self.displayLinkWrapper.targetTimestamp - self.displayLinkWrapper.timestamp);
}

# if SENTRY_TARGET_PROFILING_SUPPORTED
if (self.refreshRateTimestamps.count == 0
|| self.refreshRateTimestamps.lastObject[@"refresh_rate"].doubleValue
!= actualFramesPerSecond) {
Expand All @@ -128,6 +131,7 @@ - (void)displayLinkCallback
@"refresh_rate" : @(actualFramesPerSecond),
}];
}
# endif // SENTRY_TARGET_PROFILING_SUPPORTED

// Most frames take just a few microseconds longer than the optimal caculated duration.
// Therefore we substract one, because otherwise almost all frames would be slow.
Expand Down

0 comments on commit 77cb781

Please sign in to comment.