Created
January 23, 2014 16:36
-
-
Save antirez/8581896 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Return the UNIX time in microseconds */ | |
long long ustime(void) { | |
struct timeval tv; | |
long long ust; | |
gettimeofday(&tv, NULL); | |
ust = ((long long)tv.tv_sec)*1000000; | |
ust += tv.tv_usec; | |
return ust; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment