code: public synchronized long getLastEventDate() throws DevFailed {
          if (events.size() == 0)
              Except.throw_exception("BUFFER_EMPTY",
                      "Event queue is empty.",
                      "EventQueu.getNextEvent()");
          EventData event = events.get(events.size()-1);
          return event.date;
      }
docs: ==================================================================