code: function Time(name, ...rest) {
      let h = (methodDescriptor)=>{
          let {key, descriptor} = methodDescriptor;
  
          let fn = descriptor.value;
          let timer;
  
          let timeStart;
          let timeEnd;
          if (console != null && typeof console.time === 'function') {
              timeStart = console.time;
              timeEnd = console.timeEnd;
          } else {
              timeStart = ()=>{
                  timer = Date.now();
              };
  
              timeEnd = (name)=>{
                  let abstime = Date.now() - timer;
  
                  console.log(name, '：', abstime);
              };
          }
  
          descriptor.value = function(...args) {
              timeStart(name || key);
              let r = fn.apply(this, args);
  
              if (r && typeof r.then === 'function') {
                  return r.then((succ)=>{
                      timeEnd(name || key);
                      return Promise.resolve(succ);
                  }, (fail)=>{
                      timeEnd(name || key);
                      return Promise.reject(fail);
                  });
              } else {
                  timeEnd(name || key);
                  return r;
              }
          };
  
          return {
              ...methodDescriptor,
              descriptor,
          };
      };
  
      if (typeof name === 'string') {
          return h;
      } else {
          let args = [name, ...rest];
          name = void(0);
          h(...args);
      }
  }
docs: record timing that function consume.
  
  @param {any} name
  @param {any} rest
  @return {any}