Revision 8aeaaccc src/eventlog/sequencechartfacade.cc

View differences:

src/eventlog/sequencechartfacade.cc
984 984
    }
985 985
}
986 986

  
987
ptr_t SequenceChartFacade::getLargestEndtimeInEventRange(ptr_t startEventPtr, ptr_t endEventPtr) {
988
    IEvent *startEvent = (IEvent *)startEventPtr;
989
    IEvent *endEvent = (IEvent *)endEventPtr;
990
    switch (timelineMode)
991
    {
992
    case REAL_TIME:
993
    {
994
        long largest = 0;
995
        IEvent* largestEvent = startEvent;
996

  
997
        for (IEvent* current = startEvent; current; current = current->getNextEvent()) {
998
            long temp = current->getEarliestProcessingTime();
999
            if (temp > largest) {
1000
                largest = temp;
1001
                largestEvent = current;
1002
            }
1003
            if (current==endEvent) {
1004
                break;
1005
            }
1006
        }
1007
        return (ptr_t) largestEvent;
1008
    }
1009
    case SIMULATION_TIME:
1010
    case EVENT_NUMBER:
1011
    case STEP:
1012
    case NONLINEAR:
1013
    default:
1014
        return endEventPtr;
1015
    }
1016

  
1017
}

Also available in: Unified diff