code: public Double getAvgEventValue() {
          resetIfNeeded();
          synchronized(this) {
              long eventsLastInterval = numEventsLastInterval - numEventsLastLastInterval;
              if(eventsLastInterval > 0)
                  return ((totalEventValueLastInterval - totalEventValueLastLastInterval) * 1.0)
                         / eventsLastInterval;
              else
                  return 0.0;
          }
      }
docs: Returns the average event value in the current interval