mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8040140: System.nanoTime() is slow and non-monotonic on OS X
Reviewed-by: sspitsyn, shade, dholmes, acorn
This commit is contained in:
parent
a162ea836e
commit
0ef4fb7100
5 changed files with 76 additions and 61 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue