On Tue, 17 Nov 2026 15:30:55 GMT, Volkan Yazici <[email protected]> wrote:
>> Switch `jdk.httpserver` from wall clock to a monotonic one. This effectively >> fixes elapsed time measurements and scheduled event fire instants. Bonus: >> improves the test stability. >> >> In short, replaced the `System.currentTimeMillis()` & `java.util.Timer` >> combination with the `System.nanoTime()` & `ScheduledExecutorService` >> alternative. >> >> --------- >> - [X] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Volkan Yazici has updated the pull request incrementally with one additional > commit since the last revision: > > Fix `long` overflow in `monotonicInstantMillis` src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 1249: > 1247: * uses wall clock, and hence, is unsuitable for elapsed time > measurements. > 1248: */ > 1249: private static long monotonicInstantMillis() { Could we rename this method to some name that does not contain Instant? Maybe something like `monotonicMilliTicks`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33890#discussion_r4602074994
