Open
Description
Hi,
When using inet::RealTimeScheduler for emulation, for instance, with Simu5G, stale events occur frequently (some modules are dynamically deleted before the event is processed).
But the code in takeNextEvent() does not take it into account.
A possible fix is to do something similar to what is done in omnet::cSequentialScheduler::takeNextEvent(): just use a loop and delete stale events before returning them.