更新时间:2022-03-19 04:10:28
如果您要延迟一些code,你应该将它张贴在延迟时间的处理程序。
这样的处理将等待指定的时间,然后执行给定的可运行。
If you want to delay some code, you should post it in a handler with a delay time. This way the handler will wait the given time and then execute the given runnable.
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
cpuPlay();
}
}, TIME_TO_WAIT_IN_MS);