code: public StatisticImpl getStatistic() {
  
          if (enabled) {
              long curTime = stat.updateIntegral();
              stat.setLastSampleTime(curTime);
              return stat;
          } else {
              return stat;
          }
  
      }
docs: to time.