This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sat, Jul 12, 2008 at 9:51 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote: > ... if, however, you feel like you want to prepare something rock solid, following src/ptimer.c in wget (wget-1.11.4.tgz) should be OK. Note that the sysconf(_SC_MONOTONIC_CLOCK) call happens when the timer facility is initialized, would not belong to configure time. > > Paolo. > > I like the simple-first approach :) Attached is an update (everything this time), note that I'm still just checking if any of clock_gettime(REAL/MONO) and gettimeofday compile regardless of _POSIX defn's. Is this ok if I do the _POSIX checks in <chrono> itself if the corresponding _GLIBXX is defined? I guess I'm assuming that the configure-time check is suppose to figure out which of clock func's are available for use and not just, "yes, at least one is available". Few other issues with system_clock in particular. The testcase in the patch is just using dg-compile because, at least on my system, clock_gettime is defined in librt.so and I wasn't sure if adding -lrt to the dg-options is sufficient. Is another configure-time check needed to determine if clock_gettime is in librt.so or not (I've seen a similar check done in other opensource projects)? Chris
Attachment:
chrono_patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |