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;
相關文章
相關標籤/搜索