@@ -0,0 +1,2033 @@
+import android.os.Handler;%0A%0A/**%0A * Created by randy on 15/6/3.%0A */%0Apublic class EasyTimer %7B%0A    private Handler handler = new Handler();%0A    private int past_time;%0A    private long interval;%0A    private OnTaskRunListener onTaskRunListener;%0A%0A    public EasyTimer()%7B%0A        this.past_time = 0;%0A        this.interval = 1000;%0A    %7D%0A%0A    public EasyTimer(long interval)%7B%0A        this.interval = interval;%0A    %7D%0A%0A    public interface OnTaskRunListener%7B%0A        void onTaskRun(long past_time, String rendered_time);%0A    %7D%0A%0A    private Runnable task = new Runnable() %7B%0A        @Override%0A        public void run() %7B%0A            past_time += interval;%0A            handler.postDelayed(this,interval);%0A            onTaskRunListener.onTaskRun(past_time, time_render(past_time / 1000));%0A        %7D%0A    %7D;%0A%0A    public void start()%7B%0A        handler.removeCallbacks(task);%0A        handler.postDelayed(task, interval);%0A    %7D%0A%0A    public void stop()%7B%0A        handler.removeCallbacks(task);%0A    %7D%0A%0A    private String time_render(int seconds)%7B%0A        int mins = seconds / 60;%0A        int hours = mins / 60;%0A        int sec = seconds %3E 60 ? seconds %25 60 : seconds;%0A        String hours_str;%0A        String seconds_str;%0A        String mins_str;%0A        if (hours %3C 0)%7B%0A            hours_str = %2200%22;%0A        %7D else %7B%0A            if (hours %3C 10)%7B%0A                hours_str = %220%22 + hours;%0A            %7D else %7B%0A                hours_str = String.valueOf(hours);%0A            %7D%0A        %7D%0A%0A        if (mins %3C 0)%7B%0A            mins_str = %2200%22;%0A        %7D else %7B%0A            if (mins %3C 10)%7B%0A                mins_str = %220%22 + mins;%0A            %7D else %7B%0A                mins_str = String.valueOf(mins);%0A            %7D%0A        %7D%0A%0A        if (sec %3C 10)%7B%0A            seconds_str = %220%22 + sec;%0A        %7D else %7B%0A            seconds_str = String.valueOf(sec);%0A        %7D%0A%0A        return hours_str + %22:%22 + mins_str + %22:%22 + seconds_str;%0A    %7D%0A%0A    public void setOnTaskRunListener(OnTaskRunListener onTaskRunListener) %7B%0A        this.onTaskRunListener = onTaskRunListener;%0A    %7D%0A%7D%0A

Create EasyTimer.java