class CountDownUtils extends CountDownTimer {
public CountDownUtils(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
}
@Override
public void onFinish() {
Log.i("test", "结束倒计时");
mHandler.sendEmptyMessage(4);
}
@Override
public void onTick(long millisUntilFinished) {
}
}
CountDownUtils tmierutil;
private void mytimer() {
tmierutil = new CountDownUtils(20000, 1000);
tmierutil.start();
}