C/C++获取系统时间戳,精确到毫秒
一年没写博客了,很是怀念以前刷题的日子啊~ 现在工作了,开始学技术了,把自己遇到的一些技术点写在博客上,便于以后翻阅。
#include <stdio.h>
#include <sys/time.h> //添加头文件
int64_t getCurrentTime() //直接调用这个函数就行了,返回值最好是int64_t,long long应该也可以
{
struct timeval tv;
get...