System::Threading::Thread::Sleep 方法

Thread::Sleep(int) method

在指定的超时时间内停止当前线程。

static void System::Threading::Thread::Sleep(int millisecondsTimeout)
ParameterType描述
millisecondsTimeoutintTimeout 以毫秒为单位的睡眠时间。

另见

Thread::Sleep(TimeSpan) method

在指定的超时时间内停止当前线程。

static void System::Threading::Thread::Sleep(TimeSpan timeout)
ParameterType描述
timeoutTimeSpanTimeout 睡眠时间。

另见