+ return 23000;
+#endif
+}
+
+jlong
+_Jv_platform_nanotime ()
+{
+#ifdef HAVE_CLOCK_GETTIME
+ struct timespec now;
+ clockid_t id;
+#ifdef CLOCK_MONOTONIC
+ id = CLOCK_MONOTONIC;
+#elif defined (CLOCK_HIGHRES)
+ id = CLOCK_HIGHRES;
+#else
+ id = CLOCK_REALTIME;
+#endif
+ if (clock_gettime (id, &now) == 0)
+ {
+ jlong result = (jlong) now.tv_sec;
+ result = result * 1000000000LL + now.tv_nsec;
+ return result;
+ }
+ // clock_gettime failed, but we can fall through.
+#endif // HAVE_CLOCK_GETTIME
+#if defined (HAVE_GETTIMEOFDAY)
+ {
+ timeval tv;
+ gettimeofday (&tv, NULL);
+ return (tv.tv_sec * 1000000000LL) + tv.tv_usec * 1000LL;
+ }
+#else
+ return _Jv_platform_gettimeofday () * 1000000LL;
+#endif
+}
+
+// Platform-specific VM initialization.
+void
+_Jv_platform_initialize (void)
+{
+#if defined (HAVE_SIGACTION)
+ // We only want this on POSIX systems.
+ struct sigaction act;
+ act.sa_handler = SIG_IGN;
+ sigemptyset (&act.sa_mask);
+ act.sa_flags = 0;
+ sigaction (SIGPIPE, &act, NULL);
+#else
+ signal (SIGPIPE, SIG_IGN);
+#endif
+
+#if defined (HAVE_PROC_SELF_EXE)
+ // Compute our executable name
+ sprintf (exec_name, "/proc/%d/exe", getpid ());