We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
感谢分享这么好的文章,确实可以检测定位到主线程耗时函数,但是ping方法好像可以简化,NSNotificationCenter通知是多余的,ping对应dispatch而不是postNotificationName,pingMainThread函数可以改写成这样: `- (void)pingMainThread { uint64_t interval = PMainThreadWatcher_Warning_Level * NSEC_PER_SEC; self.pongTimer = createGCDTimer(interval, interval / 10000, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [self onPongTimeout]; });
dispatch_async(dispatch_get_main_queue(), ^{ [self cancelPongTimer]; });
}`
The text was updated successfully, but these errors were encountered:
嗯
Sorry, something went wrong.
No branches or pull requests
感谢分享这么好的文章,确实可以检测定位到主线程耗时函数,但是ping方法好像可以简化,NSNotificationCenter通知是多余的,ping对应dispatch而不是postNotificationName,pingMainThread函数可以改写成这样:
`- (void)pingMainThread
{
uint64_t interval = PMainThreadWatcher_Warning_Level * NSEC_PER_SEC;
self.pongTimer = createGCDTimer(interval, interval / 10000, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self onPongTimeout];
});
}`
The text was updated successfully, but these errors were encountered: