I have a loop I made like
for(DateTime later = DateTime.Now.AddSeconds(5); DateTime.Now < later; Thread.Sleep(500))
{
// ... stuff
}
and I'm wondering whether there is an easy way to convert that to a non-blocking way of doing stuff.