android 定时器刚开始计时时有几秒延时

刚开始有大概2秒延时,怎么回事

 final TextView timeout = (TextView)grid.findViewById(R.id.timeout);
 final ImageButton tock_on = (ImageButton) grid.findViewById(R.id.tock_on);
  tock_on.setOnClickListener(new View.OnClickListener() {
                public void onClick(View arg0) {
 timeout.setText("00:00:00");
                            stepTimeHandler = new Handler();
                            startTime = System.currentTimeMillis();
                            mTicker = new Runnable() {
                            public void run() {
                                String content = showTimeCount(System.currentTimeMillis() - startTime);
                                timeout.setText(content);
                                long now = SystemClock.uptimeMillis();
                                long next = now + (1000 - now % 1000);
                                stepTimeHandler.postAtTime(mTicker, next);
                            }
                    };
                    //启动计时线程,定时更新
                    mTicker.run();
                                         }
            });

第一次执行时间也就是new runnalbe和执行showtimecount的时间,应该不至于这么慢。不过如果是text偶尔跳动2秒是有可能的。先不说系统延时之类的。就从逻辑分析是有可能的

 stepTimeHandler = new Handler();
                            startTime = System.currentTimeMillis();
                            mTicker = new Runnable() {
                            public void run() {
                                String content = showTimeCount(System.currentTimeMillis() - startTime);System.currentTimeMillis() 是999毫秒,相差不到1秒,显示应该还是00:00:00
                                timeout.setText(content);
                                long now = SystemClock.uptimeMillis();//这里比如SystemClock.uptimeMillis() 刚好过了当前秒了,是1秒001毫秒
                                long next = now + (1000 - now % 1000);//到这里下次执行时间就是2秒的时候执行
                                stepTimeHandler.postAtTime(mTicker, next);//再加上post延时,下次显示就是00:00:02了
                            }