8040140: System.nanoTime() is slow and non-monotonic on OS X

Reviewed-by: sspitsyn, shade, dholmes, acorn
This commit is contained in:
Staffan Larsen 2014-04-25 07:40:33 +02:00
parent a162ea836e
commit 0ef4fb7100
5 changed files with 76 additions and 61 deletions

View file

@ -287,7 +287,11 @@ inline int os::set_sock_opt(int fd, int level, int optname,
}
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