Skip to content

Instantly share code, notes, and snippets.

@mattn
Created July 1, 2009 07:03
Show Gist options
  • Save mattn/138643 to your computer and use it in GitHub Desktop.
Save mattn/138643 to your computer and use it in GitHub Desktop.
#ifdef USE_ITHREADS
# if CORO_PTHREAD
static void *coro_thx;
# endif
#endif
#ifdef __linux
# include <time.h> /* for timespec */
# include <syscall.h> /* for SYS_* */
# ifdef SYS_clock_gettime
# define coro_clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts))
# define CORO_CLOCK_MONOTONIC 1
# define CORO_CLOCK_THREAD_CPUTIME_ID 3
# endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment