From 573b6569fdd2f82fc0b1d4e92133a04460e61ea2 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Fri, 23 Sep 2022 17:24:10 -0800 Subject: [PATCH] use api available to all platform versions --- Sources/Sentry/SentryProfiler.mm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Sources/Sentry/SentryProfiler.mm b/Sources/Sentry/SentryProfiler.mm index 544f626b17c..dc9738f6ef0 100644 --- a/Sources/Sentry/SentryProfiler.mm +++ b/Sources/Sentry/SentryProfiler.mm @@ -190,14 +190,7 @@ + (void)startForSpanID:(SentrySpanId *)spanID [SentryFramesTracker.sharedInstance resetProfilingTimestamps]; # endif // SENTRY_HAS_UIKIT [_gCurrentProfiler start]; - _gCurrentProfiler->_timeoutTimer = - [NSTimer scheduledTimerWithTimeInterval:timeoutInterval - repeats:NO - block:^(NSTimer *_Nonnull timer) { - SENTRY_LOG_DEBUG( - @"Profiler %@ timed out.", _gCurrentProfiler); - [[self class] timeoutAbort]; - }]; + _gCurrentProfiler->_timeoutTimer = [NSTimer scheduledTimerWithTimeInterval:timeoutInterval target:self selector:@selector(timeoutAbort) userInfo:nil repeats:NO]; _gCurrentProfiler->_hub = hub; }