code: public double getAverageTime(IoEventType type) {
          switch (type) {
              case MESSAGE_RECEIVED :
                  if (profileMessageReceived) {
                      return messageReceivedTimerWorker.getAverage();
                  }
                  
                  break;
                  
              case MESSAGE_SENT :
                  if (profileMessageSent) {
                      return messageSentTimerWorker.getAverage();
                  }
                  
                  break;
                  
              case SESSION_CREATED :
                  if (profileSessionCreated) {
                      return sessionCreatedTimerWorker.getAverage();
                  }
                  
                  break;
                  
              case SESSION_OPENED :
                  if (profileSessionOpened) {
                      return sessionOpenedTimerWorker.getAverage();
                  }
                  
                  break;
                  
              case SESSION_IDLE :
                  if (profileSessionIdle) {
                      return sessionIdleTimerWorker.getAverage();
                  }
                  
                  break;
                  
              case SESSION_CLOSED :
                  if (profileSessionClosed) {
                      return sessionClosedTimerWorker.getAverage();
                  }
                  
                  break;
          }
  
          throw new IllegalArgumentException(
                  "You are not monitoring this event.  Please add this event first.");
      }
docs: Get the average time for the specified method represented by the {@link IoEventType}
  
  @param type
  The {@link IoEventType} that the user wants to get the average method call time
  @return
  The average time it took to execute the method represented by the {@link IoEventType}