我怎样才能阻止/延缓code几秒钟 [英] How can i stop/delay the code for a few seconds

查看:99
本文介绍了我怎样才能阻止/延缓code几秒钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  

可能重复:结果
  我如何得到我的C#程序睡眠50毫秒?


有没有在ASP.net任何延迟()或睡眠()来停止一段时间的应用程序...


解决方案

  System.Threading.Thread.Sleep(numberOfMilisecondsToSleep)

有关进一步详情,文档。通常,这是不是你会在ASP.NET应用程序做的非常频繁。它只会发出请求显得比较慢。

Possible Duplicate:
How do I get my C# program to sleep for 50 msec?

Is there any Delay() or sleep () in ASP.net to stop the application for some time...

解决方案

System.Threading.Thread.Sleep(numberOfMilisecondsToSleep)

See the documentation for further details. Generally, this isn't something you would have to do in an ASP.NET application very frequently. It will just make the request seem slower.

这篇关于我怎样才能阻止/延缓code几秒钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆