C获取时间的两种方式

获取时间戳(精度微妙)ios #include <iostream> #include <sys/time.h> using namespace std; int main(){     struct timeval tv;      gettimeofday(&tv,NULL);//NULL指针在须要时区的时候才使用     cout<<"tv_sec:"<<tv.tv_sec<<endl;
相关文章
相关标签/搜索