Chinaunix首页 | 论坛 | 博客
  • 博客访问: 583996
  • 博文数量: 141
  • 博客积分: 3425
  • 博客等级: 中校
  • 技术积分: 1609
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-23 15:55
文章分类

全部博文(141)

文章存档

2019年(5)

2011年(19)

2010年(36)

2009年(13)

2008年(50)

2007年(18)

分类: 嵌入式

2011-07-27 10:57:28

Thread.Sleep Method (Int32)Suspends the current thread for a specified time.Namespace:  
Assembly:  mscorlib (in mscorlib.dll)


public static void Sleep(
int millisecondsTimeout
)
ParametersmillisecondsTimeoutType: 
The number of milliseconds for which the thread is blocked. Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute. Specify  to block the thread indefinitely. 
ExceptionCondition

The time-out value is negative and is not equal to .

The thread will not be scheduled for execution by the operating system for the amount of time specified. This method changes the state of the thread to include WaitSleepJoin.

This method does not perform standard COM and SendMessage pumping.

Note Note

If you need to sleep on a thread that has , but you want to perform standard COM and SendMessage pumping, consider using one of the overloads of the  method that specifies a timeout interval.


阅读(926) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~