TThread::Sleep - C++ Builder
2020-06-21 本文已影响0人
玄坴
C++ Builder 参考手册 ➙ System::Classes ➙ TThread ➙ Sleep
头文件:#include <System.Classes.hpp>
命名空间:System::Classes
类:TThread
访问权限:public:
函数原型:
static void __fastcall Sleep(int Timeout);
Sleep 是 System::Classes::TThread 的静态成员函数,挂起线程一段时间 (毫秒)
参数:
Timeout:线程挂起的时间 (毫秒)
返回值:
无。
- 线程挂起期间,CPU 处理其他线程;
- 虽然有同名并且相同功能的 Windows API 函数,这个方法是跨平台的,当然,在 Windows 平台,这个方法内部就是调用 Windows API 函数 Sleep 来实现的。
相关:
- System::Classes::TThread::SpinWait
- System::Classes::TThread::Yield
- System::Classes::TThread::Start
- System::Classes::TThread::Execute
- System::Classes::TThread::Started
- System::Classes::TThread::Terminated
- System::Classes::TThread::Finished
- System::Classes::TThread
- System::TObject
- VCL 类继承关系
C++ Builder 参考手册 ➙ System::Classes ➙ TThread ➙ Sleep