RFR: 8365919: Replace currentTimeMillis with nanoTime in Stresser.java
Albert Mingkun Yang
ayang at openjdk.org
Thu Aug 21 10:16:04 UTC 2025
Mostly a mechanic change from `currentTimeMillis()` to `nanoTime()/1000000`. It also removes `finishTime` to avoid overflowing.
The change in `iteration()` is to ensure `currentTime` is properly initialized.
(Was investigating a timeout on Windows-x64, which led me to this code. I think this fix is good enough by its own.)
Test: tier1-5
-------------
Commit messages:
- test-nano-time
Changes: https://git.openjdk.org/jdk/pull/26879/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26879&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8365919
Stats: 23 lines in 1 file changed: 5 ins; 6 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/26879.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26879/head:pull/26879
PR: https://git.openjdk.org/jdk/pull/26879
More information about the hotspot-gc-dev
mailing list