timer reset in separate go routine
问题 In the following scenario a network entity always waits for a TimeOutTime seconds before doing a particular task X . Assume this time as TimerT . During this wait of TimeOutTime seconds if the entity receives a set of external messages, it should reset the same TimerT to TimeOutTime again. If no external messages are received the expected behaviour is as follows: Timer Expired Do task X Reset the Timer again to TimeOutTime (by reset I mean, stop the timer and start over again) To simulate the