- 博客(3)
- 收藏
- 关注
转载 给程序计时的方法1
Linux下使用clock_gettime给程序计时详解,函数的原型如下:int clock_gettime(clockid_t clk_id, struct timespect *tp);clockid_tclk_id用于指定计时时钟的类型,对于我们Programmr以下三种比较常用:CLOCK_REALTIME, a system-wide realtime clock.CLOCK_PROCESS_CPUTIME_ID, high-resolution timer provided by the CPU
2011-04-30 14:20:00 773
原创 signal 11信号的处理
<br />#include <stdio.h><br />#include <stdlib.h> <br />#include <sys/mman.h><br />#include <fcntl.h><br />#include <unistd.h><br />#include <string.h><br />#include <sys/stat.h><br />#include <signal.h><br />#include <setjmp.h><br /> <br /> char *buf;<
2011-04-30 14:11:00 20957
原创 pthread_cancel 使用方法2
#include #include #define FAILURE 0#define SUCCESS 1#define UNS32 unsigned int#define m_ERROR(format, args...) printf(format, ## args);//fflush(stdout);static pthread_t g_pthre
2011-04-01 11:46:00 1485
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人