- }
- if(hasMoreEvents())
- {
- /*
- * increment the index
- */
- index++;
- StreamInputPacketReader packetReader = top.getPacketReader();
- if (packetReader.hasMoreEvents() == false) {
- StreamInputPacketIndexEntry currentPacket = packetReader
- .getCurrentPacket();
- currentPacket.indexBegin = startIndex;
- currentPacket.rankEnd = index;
- startIndex = index + 1;
+
+ if (top.getCurrentEvent() != null) {
+ this.endTime = Math.max(top.getCurrentEvent().getTimestamp(),
+ this.endTime);