Delay with tcp commands

Keep an extra global variable called feedback_deadline, initially 0.
When you do something that requires checking if 30 seconds has passed, set it to 30000 + SystemTime.

Each time you want to check if you have passed a deadline, compare Clock1.SystemTime against each deadline variable.

If (SystemTime > the variable) and (the variable > 0), you have passed a deadline, and must

  • announce the deadline has passed and
  • reset the deadline to 0

P.S. Here is a sample app with deadline variables ...