荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: Linus.bbs@bbs.zju.edu.cn (自由飞翔), 信区: Linux
标 题: Re: C语言中小于秒的延时怎么实现?
发信站: 浙江大学海纳百川 (Sat May 24 20:41:58 2003)
转信站: SZU!news.tiaozhan.com!news.happynet.org!ZJUBBS
int nanosleep(const struct timespec *rqtp, struct timespec
*rmtp);
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec;/* and nanoseconds */
};
nanosleep() suspends the current thread from execution until
either the time interval specified by rqtp has elapsed, or a
signal is delivered to the calling thread and its action is
to invoke a signal-catching function or to terminate the
thread.
If rmtp is non-NULL, the timespec structure referenced
by rmtp will be updated to contain the remaining amount
of time between rqtp and the time actually slept.
【 在 shine@happynet.org (晓风残月) 的大作中提到: 】
: 怎么用?
: nanosleep似乎有一个以上的参数
: 我用nanosleep(100)编译不通过
: 【 在 goal@bbs.pku.edu.cn (毕设中……) 的大作中提到: 】
: : nanosleep
--
※ 来源:·浙江大学海纳百川站 bbs.zju.edu.cn·[FROM: Linus]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店