< prev index next >
src/java.base/unix/native/libjli/java_md_solinux.h
Print this page
rev 56236 : 8241638: launcher time metrics always report 1 on Linux when _JAVA_LAUNCHER_DEBUG set
Reviewed-by: alanb, dholmes
Contributed-by: linzang@tencent.com
*** 24,44 ****
*/
#ifndef JAVA_MD_SOLINUX_H
#define JAVA_MD_SOLINUX_H
! #ifdef HAVE_GETHRTIME
/*
* Support for doing cheap, accurate interval timing.
*/
- #include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
! #else /* ! HAVE_GETHRTIME */
! #define CounterGet() (0)
! #define Counter2Micros(counts) (1)
! #endif /* HAVE_GETHRTIME */
/* pointer to environment */
extern char **environ;
/*
--- 24,44 ----
*/
#ifndef JAVA_MD_SOLINUX_H
#define JAVA_MD_SOLINUX_H
! #include <sys/time.h>
! #ifdef __solaris__
/*
* Support for doing cheap, accurate interval timing.
*/
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
! #else /* ! __solaris__ */
! uint64_t CounterGet(void);
! #define Counter2Micros(counts) (counts)
! #endif /* __solaris__ */
/* pointer to environment */
extern char **environ;
/*
< prev index next >