code: function(callback, duration){
          var that = this;
          var targetTime = new Date().getTime() + duration;
          var tickObj = {
              tick:function(){
                  var nowTime = new Date().getTime();
                  var dt = nowTime - targetTime;
                  if(dt >= 0){
                      if(dt < duration){
                          nowTime -= dt;
                      }
                      targetTime = nowTime + duration;
                      callback();
                  }
              }
          };
          that.addTick(tickObj);
          return tickObj;
      }
docs: 指定的时间周期来调用函数, 类似setInterval
  @param  {Function} callback
  @param  {Number}   duration 时间周期，单位毫秒
  @return {tickObj}