如何在毫秒内睡觉

编程入门 行业动态 更新时间:2024-10-26 02:31:45
本文介绍了如何在毫秒内睡觉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好。 睡眠(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/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 < www.ghoti/~kst> 圣地亚哥超级计算机中心< *> < 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 <www.ghoti/~kst> San Diego Supercomputer Center <*> <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/~shiva/welcome.txt C ++常见问题: www.parashift/c++-faq-lite C常见问题: www.eskimo/~scs/c-faq/top.html altp.lang.learn.c-c ++ faq: wwweaucomputing/learn/faq/ 其他网站: www.josuttis - C ++ STL图书馆书籍 www.sgi/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: www.slack/~shiva/welcome.txt C++ Faq: www.parashift/c++-faq-lite C Faq: www.eskimo/~scs/c-faq/top.html altp.lang.learn.c-c++ faq: wwweaucomputing/learn/faq/ Other sites: www.josuttis -- C++ STL Library book www.sgi/tech/stl -- Standard Template Library

更多推荐

如何在毫秒内睡觉

本文发布于:2023-10-30 22:25:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1544183.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!