Skip to content

Commit dfd711b

Browse files
author
duke
committed
Automatic merge of jdk:master into master
2 parents d561cd1 + f2a0bf3 commit dfd711b

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/hotspot/share/runtime/timer.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -47,22 +47,6 @@ jlong TimeHelper::micros_to_counter(jlong micros) {
4747
return micros * freq;
4848
}
4949

50-
elapsedTimer::elapsedTimer(jlong time, jlong timeUnitsPerSecond) {
51-
_active = false;
52-
jlong osTimeUnitsPerSecond = os::elapsed_frequency();
53-
assert(osTimeUnitsPerSecond % 1000 == 0, "must be");
54-
assert(timeUnitsPerSecond % 1000 == 0, "must be");
55-
while (osTimeUnitsPerSecond < timeUnitsPerSecond) {
56-
timeUnitsPerSecond /= 1000;
57-
time *= 1000;
58-
}
59-
while (osTimeUnitsPerSecond > timeUnitsPerSecond) {
60-
timeUnitsPerSecond *= 1000;
61-
time /= 1000;
62-
}
63-
_counter = time;
64-
}
65-
6650
void elapsedTimer::add(elapsedTimer t) {
6751
_counter += t._counter;
6852
}

src/hotspot/share/runtime/timer.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,6 @@ class elapsedTimer {
3737
bool _active;
3838
public:
3939
elapsedTimer() { _active = false; reset(); }
40-
elapsedTimer(jlong time, jlong timeUnitsPerSecond);
4140
void add(elapsedTimer t);
4241
void start();
4342
void stop();

0 commit comments

Comments
 (0)