获取当前时间戳
获取当前时间戳
#include <iostream> #include <sys/time.h> int main(){ struct timeval tv; gettimeofday(&tv, NULL); auto count = tv.tv_sec * 1000ul + tv.tv_usec /1000; std::cout<<"count:"<<count<<std::endl; return 0; }
获取当前时间戳
#include <iostream> #include <sys/time.h> int main(){ struct timeval tv; gettimeofday(&tv, NULL); auto count = tv.tv_sec * 1000ul + tv.tv_usec /1000; std::cout<<"count:"<<count<<std::endl; return 0; }