-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
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
经度不准,倒计时越来越慢 #2
Comments
@luo-h 我排查一下 |
@luo-h 你在列表使用倒计时吗? |
@luo-h 我测试了5分钟 没出现问题呀 |
不是列表,就是VC里面,用add和addMinuteTimer都有这个情况,我看简书评论里面也有一个人出现了这个情况啊。你可以开一个网页的倒计时作参照对比 |
@luo-h 你把你的代码复制一份给我 我来测试一下 |
LSTTimer.addMinuteTimer(forTime: TimeInterval(700), |
老哥,怎么样 |
@luo-h 加我一下微信 我这边好排查 |
你好,请问一下,NSTimer被添加在mainRunLoop中,mainRunLoop负责所有主线程事件,例如UI界面的操作,复杂的运算,这样就会造成timer的阻塞,NSTimer不准确,可以考虑GCD的定时器dispatch_time_t吗? |
还有一个问题LSTPopView这个框架写的很好,嵌入一个倒计时会不会有点臃肿呀. |
有时间的话 可以优化的 谢谢 |
有强迫症的 可能感觉会吧 有时间的话尽量除去所有依赖库 保证纯净不依赖 |
你可以设置个5分钟的倒计时试试,时间会越来越慢,倒计时两分钟后你这个可能还有3分30秒的样子
The text was updated successfully, but these errors were encountered: