文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux计算程序运行时间

linux计算程序运行时间

时间:2010-12-27  来源:xwhbin

 #include <stdio.h>
  #include <sys/time.h>
  #include <time.h>
 
  
  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);
相关阅读 更多 +
排行榜 更多 +
枪战特训2

枪战特训2

飞行射击 下载
方块枪战战场安卓版

方块枪战战场安卓版

飞行射击 下载
战斗火力射击安卓版

战斗火力射击安卓版

飞行射击 下载