• Peter Griess's avatar
    Use Mach built-ins in lieu of clock_gettime(3) and friends. · 1342be12
    Peter Griess authored
    Summary:
    - Mach doesn't support clock_getres(3) or clock_gettime(3). Provide our
    own implementations by wrapping mach_timebase_info() and
    mach_absolute_time().
    - Detect availability of of -lrt at configure time and don't link with
    it if it's not available. On Linux, this is what provides
    clock_gettime(3) and friends.
    
    Test Plan:
    - fbconfig -r folly && fbmake runtests
    - ./configure && make check on Ubuntu/FC/Mac
    
    Reviewed By: meyering@fb.com
    
    FB internal diff: D999131
    1342be12
Clock.h 1.06 KB