MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ustime

Function ustime

src/quicklist.c:1569–1577  ·  view source on GitHub ↗

Return the UNIX time in microseconds */

Source from the content-addressed store, hash-verified

1567
1568/* Return the UNIX time in microseconds */
1569static long long ustime(void) {
1570 struct timeval tv;
1571 long long ust;
1572
1573 gettimeofday(&tv, NULL);
1574 ust = ((long long)tv.tv_sec) * 1000000;
1575 ust += tv.tv_usec;
1576 return ust;
1577}
1578
1579/* Return the UNIX time in milliseconds */
1580static long long mstime(void) { return ustime() / 1000; }

Callers 1

mstimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected