I want initialize a 5-second counter and send a message. If a response message is received before the end of 5 seconds, the timer is interrupted and action is taken. However if the timer ends and no message is received another action will be taken.
I thought of setting a constant "timer = 5" and decrementing it in a "For" loop with an "IF", but the time spent will not be recorded as simulation time.
How to make this implementation to reflect simulation time?