• aaaaalbert's avatar
    Fix #47, Implement `clock_gettime` wrapper for Mac OS X / Mach · 7e51f167
    aaaaalbert authored
    This fixes a compile problem on Mac OS X that was introduced in c71563a9 when the `gettimeofday` function was replaced with `clock_gettime`, the latter of which is not available on OS X.
    In particular, this commit
    * Adds a small wrapper library, `mach_clock_gettime`, that transparently handles calls to `clock_gettime` by appropriately redirecting them to OS X's `clock_get_time` function,
    * Adds a conditional include to `main.c` so that systems that define `__MACH__` use the wrapper lib,
    * Adds the wrapper lib to the list of object files in `Makefile` that will be built if the user sets the `OSX` build option on the command line.