'C# - Polling a bool value with a timeout

I'm searching a "nice" way to poll a boolean value every 200ms and throw a timeout exception if it is not set to true in the meantime.

Are there any best practices to do so?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source