uTools-Manuals/docs/c/delay.html
2019-04-21 11:50:48 +08:00

36 lines
683 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>标准库函数 - delay</h1>
<p>原型extern void delay(unsigned int msec);</p>
<p>用法:#include &lt;system.h></p>
<p>功能:短暂延时</p>
<p>说明延时msec*4毫秒</p>
举例:<pre><code class="language-c">
// delay.c
#include &lt;system.h>
main()
{
int c;
clrscr();
printf("\nHello, world!");
delay(250); // 250*4=1000msec=1sec
clrscr();
printf("\nHi, guys");
getchar();
return 0;
}
</code></pre>相关函数:<a href="sleep.html">sleep</a>