comparison src/os/linux/vm/os_linux.cpp @ 61:5a76ab815e34

6667833: Remove CacheTimeMillis Summary: Remove -XX:+CacheTimeMillis option and associated functionality Reviewed-by: acorn, never
author sbohne
date Wed, 19 Mar 2008 09:58:01 -0400
parents a61af66fc99e
children cd0742ba123c
comparison
equal deleted inserted replaced
60:8d84e28e68ba 61:5a76ab815e34
1245 1245
1246 jlong os::elapsed_frequency() { 1246 jlong os::elapsed_frequency() {
1247 return (1000 * 1000); 1247 return (1000 * 1000);
1248 } 1248 }
1249 1249
1250 jlong os::timeofday() { 1250 jlong os::javaTimeMillis() {
1251 timeval time; 1251 timeval time;
1252 int status = gettimeofday(&time, NULL); 1252 int status = gettimeofday(&time, NULL);
1253 assert(status != -1, "linux error"); 1253 assert(status != -1, "linux error");
1254 return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000); 1254 return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000);
1255 }
1256
1257 // Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
1258 // _use_global_time is only set if CacheTimeMillis is true
1259 jlong os::javaTimeMillis() {
1260 return (_use_global_time ? read_global_time() : timeofday());
1261 } 1255 }
1262 1256
1263 #ifndef CLOCK_MONOTONIC 1257 #ifndef CLOCK_MONOTONIC
1264 #define CLOCK_MONOTONIC (1) 1258 #define CLOCK_MONOTONIC (1)
1265 #endif 1259 #endif