Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13792

add SCons configure and runtime checks for POSIX monotonic clock

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.2
    • Affects Version/s: 2.6.0
    • Component/s: Build
    • None
    • Server 2.7.2

      This is currently done in

      https://github.com/mongodb/mongo/blob/master/src/mongo/util/timer-inl.h:

      ...
      #elif defined(_POSIX_TIMERS) and _POSIX_TIMERS > 0 and defined(_POSIX_MONOTONIC_CLOCK) and _POSIX_MONOTONIC_CLOCK > 0
      
      // On systems that support the POSIX clock_gettime function, and the "monotonic" clock,
      // use those.
      #include "mongo/util/timer-posixclock-inl.h"
      
      #else
      ...
      

      It would be desirable to do this check during the SCons configuration phase and set a MONGO_HAVE_POSIX_MONOTONIC_CLOCK preprocessor variable if the "monotonic" clock is available.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: