<span style="font-size:18px;">//============================================================================
// Name : TestSleepFunction.cpp
// Author :
// Version :
// Copyright : 2014
// Description : Test Sleep Function in C++, Ansi-style
//============================================================================
#include <iostream>
#include <unistd.h>
using namespace std;
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
//1 sec=1000 milliseconds
sleep(10);//
//sleep(-1);//sleep 无限时间
cout<<"Sleep"<<endl;
return 0;
}</span>
C++ Sleep Function 用法 Sleep(-1)
原文地址:http://blog.csdn.net/greenapple_shan/article/details/39965957