加载中…
  
博文

 If you engage in an activity, you do it or are actively involved with it.  【语法信息】:V in n

【语域标签】:FORMAL 正式I have never engaged in the drug trade... 我从未参与过毒品交易。You can engage in croquet on the south lawn. 你可以参加南边草坪上的槌球游戏。

         

 participatetake part in

 join、engage、enter、attend

                              佳中

 

 

 

 

participate in

take part in

 

participate   

(2011-05-17 09:49)
标签:

杂谈

分类: GentoouLinuxbuntu

usleep函数


头文件: unistd.h   语法: void usleep(int micro_seconds);   
返回值: 无   内容说明:本函数可暂时使程序停止执行。
参数 micro_seconds 为要暂停的微秒数(us)。   

注意:这个函数不能工作在 Windows 操作系统中。参见:usleep() 与sleep()类似,用于延迟挂起进程。进程被挂起放到reday queue。   
只是一般情况下,延迟时间数量级是秒的时候,尽可能使用sleep()函数。且此函数已被废 除,可使用nanosleep。如果延迟时间为几十毫秒(1ms = 1000us),或者更小,尽可能使用usleep()函数。这样才能最佳的利用CPU时间


http://topic.csdn.net/u/20110428/07/8db4a274-55fe-436e-be07-00f1d545f264.html
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <pthread.h>

unsigned long long g_millisecond = 0;

void *timer(void *)
{
    printf('timer thread id = %#x\n',pthread_self() );
    sigset_t new_se
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有