#include
#include
#include
struct timeval tvpre, tvafter;
gettimeofday(&tvpre, NULL);
sleep(3); //这里是linux编程,这个sleep是秒为单位的
gettimeofday(&tvafter, NULL);
ast_log(LOG_NOTICE,"prepaid_staff_log: test spend time is %d msecond.\n", (tvafter.tv_sec-tvpre.tv_sec)*1000+(tvafter.tv_usec-tvpre.tv_usec)/1000);
阅读(2049) | 评论(1) | 转发(0) |