There is a stream "A" that accesses resource "B". Resource "B" can be used by another thread. In this case, the stream "A" should fall into standby mode. In the standby mode, there are two options: a) Resource "B" (namely resource "B") to access stream "A" and that having come out of expectation will begin to work with resource b) Flow "A" will wait some specified time and if this is exceeded time - stop their work (ie, existence).
To implement the idea of option "b), it was decided to tie the timer to the flow and if the time was exceeded, the flow would simply exit the perpetual cycle. The problem arose in the fact that the timer has a feature: When you start the method that was laid for him, it turns on once before the countdown begins. And we need to make it so that when the timer starts, the timing goes, and only after the expiration of which would the method turn off the thread.
Is there a Timer class that will execute the code ONLY after some time has passed?