code: public synchronized void update(double sample) {
          long now = System.currentTimeMillis();
  
          removeOutOfTimeWindowEntries();
          cslm.put(now, sample);
      }
docs: Updates the average with the latest measurement.
  @param sample the latest measurement in the rolling average