#include<sys/time.h>
struct timeval tv;
if(gettimeofday(&tv,NULL)!=0){
return 0;
}
long sec = tv.tv_sec * 1000 + tv.tv_usec / 1000;
c++ 获取时间戳
最新推荐文章于 2024-08-18 22:15:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
#include<sys/time.h>
struct timeval tv;
if(gettimeofday(&tv,NULL)!=0){
return 0;
}
long sec = tv.tv_sec * 1000 + tv.tv_usec / 1000;