CountDownTimer countDownTimer = new CountDownTimer(3000, 1) {
@Override
public void onTick(long millisUntilFinished) {
}
@Override
public void onFinish() {
// 结束之后执行的事件
}
};
// 开始计时
countDownTimer.start();
// 结束计时
countDownTimer.cancel();
04-10
636
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-23
1275
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)