comparison src/os/linux/vm/os_linux.cpp @ 62:cd0742ba123c

Merge
author kamg
date Thu, 20 Mar 2008 09:17:30 -0500
parents e195fe4c40c7 5a76ab815e34
children 82db0859acbe
comparison
equal deleted inserted replaced
52:75b0f3cb1943 62:cd0742ba123c
1259 1259
1260 jlong os::elapsed_frequency() { 1260 jlong os::elapsed_frequency() {
1261 return (1000 * 1000); 1261 return (1000 * 1000);
1262 } 1262 }
1263 1263
1264 jlong os::timeofday() { 1264 jlong os::javaTimeMillis() {
1265 timeval time; 1265 timeval time;
1266 int status = gettimeofday(&time, NULL); 1266 int status = gettimeofday(&time, NULL);
1267 assert(status != -1, "linux error"); 1267 assert(status != -1, "linux error");
1268 return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000); 1268 return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000);
1269 }
1270
1271 // Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
1272 // _use_global_time is only set if CacheTimeMillis is true
1273 jlong os::javaTimeMillis() {
1274 return (_use_global_time ? read_global_time() : timeofday());
1275 } 1269 }
1276 1270
1277 #ifndef CLOCK_MONOTONIC 1271 #ifndef CLOCK_MONOTONIC
1278 #define CLOCK_MONOTONIC (1) 1272 #define CLOCK_MONOTONIC (1)
1279 #endif 1273 #endif