[SERVER-13792] add SCons configure and runtime checks for POSIX monotonic clock Created: 30/Apr/14  Updated: 04/Sep/14  Resolved: 06/Jun/14

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 2.6.0
Fix Version/s: 2.7.2

Type: Improvement Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-13762 Configure check for library rt is not... Closed
Sprint: Server 2.7.2
Participants:

 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.



 Comments   
Comment by Githook User [ 06/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-13792 added runtime and build-time checks for POSIX monotonic clocks. de-inlined Timer::now() implementations
Branch: master
https://github.com/mongodb/mongo/commit/ffaa85ae89335efbef26338a12cc41b351fc8bda

Generated at Thu Feb 08 03:32:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.