C++获取系统时间方法(毫秒级)

#include <sys/time.h>
long getCurrentTime()
{
   struct timeval tv;
   gettimeofday(&tv,NULL);
   return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}

posted @ 2017-08-03 14:36  wzzkaifa  阅读(1483)  评论(0编辑  收藏  举报