add SCons configure and runtime checks for POSIX monotonic clock

XMLWordPrintableJSON

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

      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
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: