#include<ctime>
/* 等待你输入的系统时间为单位 之后进行下边的动作
int main()
{
using namespace std;
cout<<"Enter the delay time, in secords: ";
float secs;
cin>>secs;
clock_t delay=secs * CLOCKS_PER_SEC;
cout<<"starting\a\n";
clock_t start=clock();
while(clock()-start<delay)
;
cout<<"Done\a\n";
return 0;
}
CLOCKS_PER_SEC 为符号常量 每秒钟所包含的系统时间数
clock()返回程序开始执行后所需的系统时间
clock_t类型 编译器可以将其转化成long 、unsigned int或其他类型