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

add SCons configure and runtime checks for POSIX monotonic clock

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.7.2
    • Component/s: Build
    • Labels:
      None
    • Sprint:
      Server 2.7.2

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: