Revision 2f5cc443 src/sim/csimulation.cc

View differences:

src/sim/csimulation.cc
110 110
    setScheduler(new cSequentialScheduler());
111 111

  
112 112
    eventsPerSimTimeInstance = 0;
113

  
114
    //calibrate stopwatch
115
    sequentialWatch.calibrateTSC();
113 116
}
114 117

  
115 118
cSimulation::~cSimulation()
......
702 705
                setContextType(CTX_EVENT);
703 706

  
704 707
                EVCB.simulationEvent(msg);
705
                // store arrival event number of this message; it is useful input for the
706
                // sequence chart tool if the message doesn't get immediately deleted or
707
                // sent out again
708

  
708 709
                msg->setPreviousEventNumber(event_num);
709 710

  
711
                sequentialWatch.reset();
712
                sequentialWatch.startTicking();
710 713
                // take ownership in callHandleMessage after concurrency check
711 714
                aMod->callHandleMessage(msg);
715
                sequentialWatch.stopTicking();
716

  
717
                //Store measured complexity and write to file
718
                EVCB.simulationEventEnd(sequentialWatch.getTicksTime());
719

  
720
                // take ownership in callHandleMessage after concurrency check
712 721
                // unset busy to release module for further events
713 722
                aMod->unsetBusy();
714 723
            }
......
720 729
            setContext(mod);
721 730
            setContextType(CTX_EVENT);
722 731

  
723
            EVCB.simulationEvent(msg);
732
            //Disabled logging for simpleModules as we assume to have a duration.
733
            //EVCB.simulationEvent(msg);
724 734
            // store arrival event number of this message; it is useful input for the
725 735
            // sequence chart tool if the message doesn't get immediately deleted or
726 736
            // sent out again
......
917 927
    // eventlog callback interface
918 928
    virtual void objectDeleted(cObject *object) {}
919 929
    virtual void simulationEvent(cMessage *msg)  {}
930
    virtual void simulationEventEnd(double complexity)  {}
920 931
    virtual void messageSent_OBSOLETE(cMessage *msg, cGate *directToGate=NULL)  {}
921 932
    virtual void messageScheduled(cMessage *msg)  {}
922 933
    virtual void messageCancelled(cMessage *msg)  {}

Also available in: Unified diff