一个关于Sleep()函数的有关问题

请教大家一个关于Sleep()函数的问题:
大家好,在这里请教各位朋友一个问题:

我有一个在windows上运行的程序,其中有这样一条语句:
  Sleep(1000);
程序到此停顿1秒钟。由于现在程序要在linux下运行,所以请教大家在linux下是否有相对应的函数,完成等待一段时间的操作(如果该函数在win和linux下通用是最好了)。

谢谢!

------解决方案--------------------
用C的方法应该行把
小写的sleep试试
------解决方案--------------------
linux 下是 sleep 函数
------解决方案--------------------
a> MFC中的Sleep函数原型为:

void Sleep(
DWORD dwMilliseconds
);

b> linux下的sleep函数原型为:

unsigned int sleep(unsigned int seconds);

MFC中的是微秒,linux下的是秒。linux下用微秒的线程休眠函数是:

void usleep(unsigned long usec);
int usleep(unsigned long usec); /* SUSv2 */

或者用select函数+timeval结构也可以(最多精确到微秒),

或者用pselect函数+timespec(可以精确到纳秒,足够精确了!)
------解决方案--------------------
我记得linux下单位是秒 用gcc编译的
------解决方案--------------------
sleep();
jf
------解决方案--------------------
sleep()

usleep()
------解决方案--------------------
NAME
sleep - Sleep for the specified number of seconds

SYNOPSIS
#include <unistd.h>

unsigned int sleep(unsigned int seconds);

DESCRIPTION
sleep() makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not ignored.

RETURN VALUE
Zero if the requested time has elapsed, or the number of seconds left to sleep.

---------------------------------------------

NAME
usleep - suspend execution for microsecond intervals

SYNOPSIS
#include <unistd.h>

void usleep(unsigned long usec);
int usleep(unsigned long usec); /* SUSv2 */

DESCRIPTION
The usleep() function suspends execution of the calling process for usec microseconds. The sleep may be lengthened
slightly by any system activity or by the time spent processing the call.

RETURN VALUE
None (BSD). Or: 0 on success, -1 on error (SUSv2).

ERRORS
EINTR Interrupted by a signal.

EINVAL usec is not smaller than 1000000. (On systems where that is considered an error.)



------解决方案--------------------
还有
alarm(2), getitimer(2), nanosleep(2), select(2), setitimer(2), sleep(3)
------解决方案--------------------
delay();

------解决方案--------------------
sleep()
计时单位是秒
------解决方案--------------------
WINDOWS下Sleep函数与LINUX下sleep函数区别
VC++中的Sleep函数原型为:

void Sleep(
DWORD dwMilliseconds
);

linux下的sleep函数原型为:

unsigned int sleep(unsigned int seconds);

MFC中的是微秒,linux下的是秒。linux下用微秒的线程休眠函数是:

void usleep(unsigned long usec);
int usleep(unsigned long usec); /* SUSv2 */

或者用select函数+timeval结构也可以(最多精确到微秒),

或者用pselect函数+timespec(可以精确到纳秒,足够精确了!)
------解决方案--------------------
sleep(1);