OSX: Provide nanosecond resolution timer for tests

Directly implement the getCurrentTime function on OSX instead
of providing a gettimeofday based clock_gettime implementation