¡@

Home 

c# Programming Glossary: delayinmilliseconds

Is there a Task based replacement for System.Threading.Timer?

http://stackoverflow.com/questions/4890915/is-there-a-task-based-replacement-for-system-threading-timer

Action action int intervalInMilliseconds int delayInMilliseconds CancellationToken cancelToken Action wrapperAction if cancelToken.IsCancellationRequested.. if cancelToken.IsCancellationRequested return if delayInMilliseconds 0 Thread.Sleep delayInMilliseconds while true if cancelToken.IsCancellationRequested.. return if delayInMilliseconds 0 Thread.Sleep delayInMilliseconds while true if cancelToken.IsCancellationRequested break Task.Factory.StartNew..