This test fails quite frequently on Windows, with Serial GC. Timer granularity seems to be the problem, no cpu time is counted.
This change is a simple increase in work done to make the cpu time get counted as >0 on on Windows. Made it a platform-specific increase in work to not slow the test unnecessarily, e.g. avoid a significant elapsed time change on some test variations on Linux. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8386833: java/lang/management/MemoryMXBean/TestGetTotalGcCpuTime.java#Serial fails with "Some GC CPU time must have been reported" exception Changes: https://git.openjdk.org/jdk/pull/31805/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31805&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8386833 Stats: 14 lines in 1 file changed: 9 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/31805.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31805/head:pull/31805 PR: https://git.openjdk.org/jdk/pull/31805
