Thread.Sleep在WinRT中---uwp应用

当我注意到WinRT缺少Thread.Sleep功能时,我感到惊讶。幸运的是,MSDN论坛提供了以下代码段,它很好地提供了相同的功能:

1 static void Sleep(int ms)
2 {
3    new System.Threading.ManualResetEvent(false).WaitOne(ms);
4 }

 

posted @ 2017-04-25 16:37  韵切  阅读(319)  评论(0编辑  收藏  举报