Skip to content

不是很可靠 #1

Description

@Gru110110110

Step4. 如果UI线程没有发生阻塞,则sleep过后,tickCounter一定与原来的值不相等,否则一定是UI线程发生阻塞;
假设先执行tickCounter累加后(一行累加代码,时间可忽略不计),马上转到某个耗时子线程,导致UI线程阻塞,sleep过后 tickCounter值还是相等的,但是已经明显发生卡顿。也就是很大概率发生多次临近阈值5s的卡顿 或者超过,这个时候并不能明显显示出来。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions