摘要: 1、信号量 SIGALRM + alarm() 函数说明:alarm()用来设置信号SIGALRM 在经过参数seconds 指定的秒数后传送给目前的进程. 如果参数seconds 为0, 则之前设置的闹钟会被取消, 并将剩下的时间返回.返回值:返回之前闹钟的剩余秒数, 如果之前未设闹钟则返回0. 阅读全文
posted @ 2017-01-03 22:37 c_sun_boke 阅读(173) 评论(0) 推荐(0) 编辑
摘要: http://lists.gnu.org/archive/html/bug-commoncpp/2004-05/msg00006.html 本意是找一个线程安全并可重入的 求线程运行时间的函数。 time(), gettimeofday() and possibly localtime() are 阅读全文
posted @ 2017-01-03 19:26 c_sun_boke 阅读(3025) 评论(0) 推荐(0) 编辑