I am writing an application using soap messages. What I am trying to do is every 5 minutes if there is no activity send a soap command. The catch is if there is activity, for example a soap message is sent from the client, I will have to reset my current time to when the last message was sent. I am not sure how to implement this. Espicially when the current minute goes from 59 to 0 changing to the next hour. If anybody has any suggestions it would really be appreciated.