Skip to content

Instantly share code, notes, and snippets.

@sapier
Created March 3, 2014 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapier/9332543 to your computer and use it in GitHub Desktop.
Save sapier/9332543 to your computer and use it in GitHub Desktop.
int clock_gettime(clockid_t clk_id, struct timespec *tp) {
struct timeval tv;
gettimeofday(&tv, NULL);
tp.tv_sec = tv.tv_sec;
tp.tv_nsec = tv.tv_usec*1000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment