%description: If there are several messages scheduled for the end-time, all of them are processed before simulation stops. %module: Module class Module : public cSimpleModule { public: virtual void initialize() override; virtual void handleMessage(cMessage *msg) override; virtual void finish() override; }; Define_Module(Module); void Module::initialize() { #ifdef USE_OMNETPP4x_FINGERPRINTS EV << "#UNRESOLVED: in USE_OMNETPP4x_FINGERPRINTS mode, simtime-limit works differently and this test fails\n"; #endif scheduleAt(5.0, new cMessage("msg1")); scheduleAt(5.0, new cMessage("msg2")); scheduleAt(5.0, new cMessage("msg3")); } void Module::handleMessage(cMessage *msg) { EV << msg->getName() << " at " << simTime() << "s" << endl; delete msg; } void Module::finish() { EV << "finish at " << simTime() << "s" << endl; EV << "-" << endl; } %inifile: test.ini [General] network = Module sim-time-limit = 5s %contains-regex: stdout .*msg1 at 5s .*msg2 at 5s .*msg3 at 5s .*finish at 5s -