User account creation filtered due to spam.

View | Details | Raw Unified | Return to bug 44411
Collapse All | Expand All

(-)classpath-0.98-original/include/java_lang_VMSystem.h (+1 lines)
Lines 15-20 Link Here
15
JNIEXPORT void JNICALL Java_java_lang_VMSystem_setIn (JNIEnv *env, jclass, jobject);
15
JNIEXPORT void JNICALL Java_java_lang_VMSystem_setIn (JNIEnv *env, jclass, jobject);
16
JNIEXPORT void JNICALL Java_java_lang_VMSystem_setOut (JNIEnv *env, jclass, jobject);
16
JNIEXPORT void JNICALL Java_java_lang_VMSystem_setOut (JNIEnv *env, jclass, jobject);
17
JNIEXPORT void JNICALL Java_java_lang_VMSystem_setErr (JNIEnv *env, jclass, jobject);
17
JNIEXPORT void JNICALL Java_java_lang_VMSystem_setErr (JNIEnv *env, jclass, jobject);
18
JNIEXPORT jlong JNICALL Java_java_lang_VMSystem_currentTimeMillis (JNIEnv *env, jclass);
18
JNIEXPORT jlong JNICALL Java_java_lang_VMSystem_nanoTime (JNIEnv *env, jclass);
19
JNIEXPORT jlong JNICALL Java_java_lang_VMSystem_nanoTime (JNIEnv *env, jclass);
19
JNIEXPORT jobject JNICALL Java_java_lang_VMSystem_environ (JNIEnv *env, jclass);
20
JNIEXPORT jobject JNICALL Java_java_lang_VMSystem_environ (JNIEnv *env, jclass);
20
JNIEXPORT jstring JNICALL Java_java_lang_VMSystem_getenv (JNIEnv *env, jclass, jstring);
21
JNIEXPORT jstring JNICALL Java_java_lang_VMSystem_getenv (JNIEnv *env, jclass, jstring);
(-)classpath-0.98-original/native/jni/java-lang/java_lang_VMSystem.c (-1 / +25 lines)
Lines 39-44 Link Here
39
39
40
#include <jcl.h>
40
#include <jcl.h>
41
41
42
#include <time.h>
42
#include <sys/time.h>
43
#include <sys/time.h>
43
#include <stdlib.h>
44
#include <stdlib.h>
44
45
Lines 121-126 Link Here
121
  (JNIEnv * env __attribute__ ((__unused__)),
122
  (JNIEnv * env __attribute__ ((__unused__)),
122
   jclass thisClass __attribute__ ((__unused__)))
123
   jclass thisClass __attribute__ ((__unused__)))
123
{
124
{
125
  jlong result;
126
  struct timespec tp;
127
128
  if (clock_gettime (CLOCK_MONOTONIC, &tp) == -1)
129
    (*env)->FatalError (env, "clock_gettime call failed.");
130
131
  result = (jlong) tp.tv_sec;
132
  result *= (jlong)1000000000L;
133
  result += (jlong)tp.tv_nsec;
134
135
  return result;
136
}
137
138
/*
139
 * Class:     java_lang_VMSystem
140
 * Method:    currentTimeMillis
141
 * Signature: ()J
142
 */
143
JNIEXPORT jlong JNICALL
144
Java_java_lang_VMSystem_currentTimeMillis
145
  (JNIEnv * env __attribute__ ((__unused__)),
146
   jclass thisClass __attribute__ ((__unused__)))
147
{
124
  /* Note: this implementation copied directly from Japhar's, by Chris Toshok. */
148
  /* Note: this implementation copied directly from Japhar's, by Chris Toshok. */
125
  jlong result;
149
  jlong result;
126
  struct timeval tp;
150
  struct timeval tp;
Lines 131-137 Link Here
131
  result = (jlong) tp.tv_sec;
155
  result = (jlong) tp.tv_sec;
132
  result *= (jlong)1000000L;
156
  result *= (jlong)1000000L;
133
  result += (jlong)tp.tv_usec;
157
  result += (jlong)tp.tv_usec;
134
  result *= (jlong)1000;
158
  result /= (jlong)1000L;
135
159
136
  return result;
160
  return result;
137
}
161
}
(-)classpath-0.98-original/native/jni/java-lang/Makefile.am (-1 / +1 lines)
Lines 14-20 Link Here
14
14
15
libjavalangmanagement_la_SOURCES = gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c
15
libjavalangmanagement_la_SOURCES = gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c
16
16
17
AM_LDFLAGS = @CLASSPATH_MODULE@
17
AM_LDFLAGS = @CLASSPATH_MODULE@ -lrt
18
AM_CPPFLAGS = @CLASSPATH_INCLUDES@ -I$(top_srcdir)/native/fdlibm
18
AM_CPPFLAGS = @CLASSPATH_INCLUDES@ -I$(top_srcdir)/native/fdlibm
19
AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ @ERROR_CFLAGS@ \
19
AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ @ERROR_CFLAGS@ \
20
            @EXTRA_CFLAGS@
20
            @EXTRA_CFLAGS@
(-)classpath-0.98-original/native/jni/java-lang/Makefile.in (-1 / +1 lines)
Lines 315-321 Link Here
315
315
316
libjavalangreflect_la_SOURCES = java_lang_reflect_VMArray.c
316
libjavalangreflect_la_SOURCES = java_lang_reflect_VMArray.c
317
libjavalangmanagement_la_SOURCES = gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c
317
libjavalangmanagement_la_SOURCES = gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c
318
AM_LDFLAGS = @CLASSPATH_MODULE@
318
AM_LDFLAGS = @CLASSPATH_MODULE@ -lrt
319
AM_CPPFLAGS = @CLASSPATH_INCLUDES@ -I$(top_srcdir)/native/fdlibm
319
AM_CPPFLAGS = @CLASSPATH_INCLUDES@ -I$(top_srcdir)/native/fdlibm
320
AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ @ERROR_CFLAGS@ \
320
AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ @ERROR_CFLAGS@ \
321
            @EXTRA_CFLAGS@
321
            @EXTRA_CFLAGS@
(-)classpath-0.98-original/vm/reference/java/lang/VMSystem.java (-4 / +1 lines)
Lines 135-144 Link Here
135
   * @return the current time
135
   * @return the current time
136
   * @see java.util.Date
136
   * @see java.util.Date
137
   */
137
   */
138
   public static long currentTimeMillis()
138
  public static native long currentTimeMillis();
139
   {
140
     return nanoTime() / 1000000L;
141
   }
142
139
143
  /**
140
  /**
144
   * <p>
141
   * <p>

Return to bug 44411