Skip to content

Instantly share code, notes, and snippets.

@shichao-an
Last active August 29, 2015 14:22
Show Gist options
  • Save shichao-an/83e13fecc886c9653976 to your computer and use it in GitHub Desktop.
Save shichao-an/83e13fecc886c9653976 to your computer and use it in GitHub Desktop.
#include <sys/time.h>
int clock_gettime(clockid_t clock_id, struct timespec *tsp);
/* Returns: 0 if OK, −1 on error */
int clock_getres(clockid_t clock_id, struct timespec *tsp);
/* Returns: 0 if OK, −1 on error */
int clock_settime(clockid_t clock_id, const struct timespec *tsp);
/* Returns: 0 if OK, −1 on error */
int gettimeofday(struct timeval *restrict tp, void *restrict tzp);
/* Returns: 0 always */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment