src/os/bsd/vm/os_bsd.inline.hpp
Print this page
rev 6280 : 8040140: System.nanoTime() is slow and non-monotonic on OS X
6864866: add a flag to use result of gethrtime() directly in os::getTimeNanos() on Solaris
Reviewed-by: sspitsyn, shade, dholmes
*** 285,293 ****
--- 285,297 ----
const char* optval, socklen_t optlen) {
return ::setsockopt(fd, level, optname, optval, optlen);
}
inline bool os::supports_monotonic_clock() {
+ #ifdef __APPLE__
+ return true;
+ #else
return Bsd::_clock_gettime != NULL;
+ #endif
}
#endif // OS_BSD_VM_OS_BSD_INLINE_HPP