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

Thread::Sleep(int) method

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

static void System::Threading::Thread::Sleep(int millisecondsTimeout)
参数类型描述
millisecondsTimeoutintTimeout 用于以毫秒为单位的睡眠。

另见

Thread::Sleep(TimeSpan) method

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

static void System::Threading::Thread::Sleep(TimeSpan timeout)
参数类型描述
timeoutTimeSpanTimeout 用于睡眠。

另见