[PATCH] Use clock_gettime()'s CLOCK_REALTIME instead of gettimeofday() where possible

Jonathan Roelofs jonathan at codesourcery.com
Wed Mar 11 09:46:48 PDT 2015


Indeed, I added `_LIBCPP_HAS_NO_MONOTONIC_CLOCK` for exactly the situation @hfinkel describes: my platform doesn't have access to a monotonic clock. Originally (and in my local fork) it had checks for `_POSIX_TIMERS` and `_POSIX_MONOTONIC_CLOCK` but those seem to have gone away upstream.

Sorry about the bad name suggestions. I suppose I was conflating the "does it have X" checks with the "how should X be implemented" checks. For my platform, the latter is irrelevant because the answer to the former is "no". For yours, this distinction is more important. Now I see that the naming should reflect that.


http://reviews.llvm.org/D8253

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list