Skip to main content

Add delays to connections

OMNeT++ allows you to easily setup a delay for any connection in Network.NED like this :

node1.my_gate <--> {delay=2s;} <--> node2.my_gate;

If you re-run your code now, you will observe a different between when the node has sent out a message and when it was received on the other side, like here in the debugging output:

delayed-connections.png

Note that this delay will be applied ALWAYS, for both directions. There are more options here (only in one direction, random delay, etc.) that you can find in the OMNeT++ manual.