Chinaunix首页 | 论坛 | 博客
  • 博客访问: 297062
  • 博文数量: 69
  • 博客积分: 3093
  • 博客等级: 中校
  • 技术积分: 626
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-17 13:48
文章分类

全部博文(69)

文章存档

2011年(27)

2010年(11)

2009年(31)

分类: LINUX

2010-12-27 18:21:37

 #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);
阅读(2013) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-01-02 11:59:54

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com