mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
6667833: Remove CacheTimeMillis
Remove -XX:+CacheTimeMillis option and associated functionality Reviewed-by: acorn, never
This commit is contained in:
parent
387f42921b
commit
bf559c6dce
11 changed files with 12 additions and 155 deletions
|
@ -1247,19 +1247,13 @@ jlong os::elapsed_frequency() {
|
|||
return (1000 * 1000);
|
||||
}
|
||||
|
||||
jlong os::timeofday() {
|
||||
jlong os::javaTimeMillis() {
|
||||
timeval time;
|
||||
int status = gettimeofday(&time, NULL);
|
||||
assert(status != -1, "linux error");
|
||||
return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000);
|
||||
}
|
||||
|
||||
// Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
|
||||
// _use_global_time is only set if CacheTimeMillis is true
|
||||
jlong os::javaTimeMillis() {
|
||||
return (_use_global_time ? read_global_time() : timeofday());
|
||||
}
|
||||
|
||||
#ifndef CLOCK_MONOTONIC
|
||||
#define CLOCK_MONOTONIC (1)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue