I have an application where orders are sent to be processed by waiters. However, a waiter has 30 seconds to confirm that he accepts the order, or it will be passed to the next. How can I check if the IsAccepted column in the orders table was marked as true 30 seconds after the entry was inserted?
I’m looking for a solution as easy as possible. Thank you
Simplest thing is to start a timer to fire 30 seconds after the insert.
See Comparing the Timer Classes in the .NET Framework Class Library on MSDN for a comparison of the different timer classes.
Just make sure to stop the timer in the tick event handler (or
Elapsedhandler or whatever handler corresponds to the timer you select).