813 void
814 PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)
815 {
816 // stubbed out for windows and *nixes.
817 }
818
819 void
820 RegisterThread()
821 {
822 // stubbed out for windows and *nixes.
823 }
824
825 /*
826 * on unix, we return a false to indicate this option is not applicable
827 */
828 jboolean
829 ProcessPlatformOption(const char *arg)
830 {
831 return JNI_FALSE;
832 }
|
813 void
814 PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)
815 {
816 // stubbed out for windows and *nixes.
817 }
818
819 void
820 RegisterThread()
821 {
822 // stubbed out for windows and *nixes.
823 }
824
825 /*
826 * on unix, we return a false to indicate this option is not applicable
827 */
828 jboolean
829 ProcessPlatformOption(const char *arg)
830 {
831 return JNI_FALSE;
832 }
833
834 #ifndef __solaris__
835
836 /*
837 * Provide a CounterGet() implementation based on gettimeofday() which
838 * is universally available, even though it may not be 'high resolution'
839 * compared to platforms that provide gethrtime() (like Solaris). It is
840 * also subject to time-of-day changes, but alternatives may not be
841 * known to be available at either build time or run time.
842 */
843 uint64_t CounterGet() {
844 uint64_t result = 0;
845 struct timeval tv;
846 if (gettimeofday(&tv, NULL) != -1) {
847 result = 1000000LL * (uint64_t)tv.tv_sec;
848 result += (uint64_t)tv.tv_usec;
849 }
850 return result;
851 }
852
853 #endif // !__solaris__
|