如何在毫秒内睡觉 [英] How to sleep during millisecond
问题描述
你好。
睡眠(x)功能让一个过程在x秒内睡眠。
但是,如何在几毫秒内睡觉。 ..
请。帮助我。
谢谢。问候。
Hello.
Sleep (x) function make a process sleep during x seconds.
but, how to sleep during milliseconds...
Pls. help me.
Thank you. Regards.
推荐答案
2004年12月9日星期四11:40:46 +0900,Yeounkun,哦写道:
On Thu, 09 Dec 2004 11:40:46 +0900, Yeounkun, Oh wrote:
你好。
睡眠(x)功能让一个过程在x秒内睡眠。
但是,如何在几毫秒内睡觉......
Hello.
Sleep (x) function make a process sleep during x seconds.
but, how to sleep during milliseconds...
尝试''usleep()''
不确定这是否有帮助。
-
PLDaniels - 软件 - Xamime
Unix系统互联网开发ABN 19 500 721 806
PGP公钥在 http: //www.pldaniels.com/gpg-keys.pld
" Yeounkun,Oh" < RA ***** @ oniontech21.co.kr>写道:
"Yeounkun, Oh" <ra*****@oniontech21.co.kr> writes:
Sleep(x)函数使进程在x秒内休眠。
但是,如何在几毫秒内休眠...
Sleep (x) function make a process sleep during x seconds.
but, how to sleep during milliseconds...
标准C中没有sleep()(或Sleep())函数,尽管许多
系统提供了这样的功能。许多系统可能还提供了一种睡眠方式达到指定的毫秒数。你需要在一个特定于你的系统的新闻组中询问
(Windows,Unix,
Linux,等等)。
-
Keith Thompson(The_Other_Keith) ks***@mib.org < http://www.ghoti.net/~kst>
圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>
我们必须做点什么。这是事情。因此,我们必须这样做。
There is no sleep() (or Sleep()) function in standard C, though many
systems provide such a function. Many systems probably also provide a
way to sleep for a specified number of milliseconds. You''ll need to
ask in a newsgroup that''s specific to your system (Windows, Unix,
Linux, whatever).
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Paul L Daniels写道:
Paul L Daniels wrote:
2004年12月9日星期四11:40:46 +0900,Yeounkun ,哦写道:
On Thu, 09 Dec 2004 11:40:46 +0900, Yeounkun, Oh wrote:
你好。
睡眠(x)功能使进程在x秒内休眠。
>但是,如何在几毫秒内睡觉...
Hello.
Sleep (x) function make a process sleep during x seconds.
but, how to sleep during milliseconds...
尝试''usleep()''
不确定这是否会有帮助。
try ''usleep()''
Not sure if that''ll help.
找到了usleep()中的哪个编译器?
我在C语言规范的副本中找不到它,
你能让我们知道它在哪里吗?
因为偏离主题,也许你可以使用:
wait()
暂停()
延迟()
ms_delay()
us_delay()
您还可以使用计时器并轮询完成咬一下
看看它什么时候结束。或者你可以使用中断
系统。
-
托马斯马修斯
C ++新闻组欢迎信息:
http:// www。 slack.net/~shiva/welcome.txt
C ++常见问题: http://www.parashift.com/c++-faq-lite
C常见问题: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c ++ faq:
http://www.comeaucomputing.com/learn/faq/
其他网站:
http://www.josuttis.com - C ++ STL图书馆书籍
http://www.sgi.com/tech/stl - - 标准模板库
Which compiler is usleep() found in?
I didn''t find it in my copy of the C language specification,
could you let us know where it is?
Since where off-topic, perhaps you could use:
wait()
suspend()
delay()
ms_delay()
us_delay()
You could also use a timer and poll the "done" bit to
see when it is finished. Or you could use an interrupt
system.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
这篇关于如何在毫秒内睡觉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!