// prototypes: // int gettimeofday (struct timeval restrict tv, void restrict tz)
uint64_t msSinceEpoch() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec * 1000 + tv.tv_usec / 1000; }
2. time(NULL) c标准
```c
#include <time.h>
// prototypes:
// time_t time (time_t *__timer)
void test() {
time_t t = time(NULL);
time_t t2;
time(&t2);
}