package com.jiuqi.mobile.core.timer; public class TimerTest { public static void main(String[] args) throws InterruptedException { TaskTest tt = new TaskTest(); tt.execute(1); new TaskTest1().execute(1000); } public static class TaskTest1 extends TaskTest{ @Override public long period() { return 5000; } @Override protected Integer doInBackground(Integer... params) throws Throwable { try{ return super.doInBackground(params); }finally{ // throw new RuntimeException("haha"); } } } }