Decorative site banner
Project icon

com.io7m.timehack6435126

  • About
  • Releases
  • Manual
  • Sources
  • License
  • Issues
Maven Central Version Maven Snapshot Code Coverage

timehack6435126


A high-resolutiom timer JVM bug workaround.

Features


  • Enables high-resolution timers in the JVM.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Motivation


The com.io7m.timehack6435126 package implements the workaround for the comedy of errors described by JDK-6435126.

  1. Oracle introduce a JVM option ForceTimeHighResolution intended to force Windows based operating systems into using a high resolution timer instead of the usual low precision one.
  2. Due to a mistake in the implementation, the ForceTimeHighResolution option actually ends up forcing the OS not to use the high resolution timer.
  3. Years pass, and someone files a bug on the broken behaviour.
  4. An anonymous developer at the company states that the behaviour has been broken for years, nobody has complained, and reasons that this means that users that are specifically asking for high resolution timers are satisfied with instead receiving low resolution timers.
  5. Someone suggests a workaround that can be used at run-time to enable the high resolution timer.
  6. Years pass.
  7. An anonymous developer at the company states that the behaviour has been broken for so long, that there's no reason to fix it now.
  8. The bug is rejected as "WONTFIX".

Usage


Call TimeHack6435126.enableHighResolutionTimer() in your program's main function prior to doing anything else.

All timer-related functions in the JVM will be significantly more precise from that point onwards.

Releases & Development Snapshots


Releases


You can subscribe to the atom feed to be notified of project releases.

The most recently released version of the package is 3.0.1.

3.0.1 Release (2024-05-16Z)

  • Update org.slf4j:slf4j-api:2.0.10 → 2.0.13.
  • Update ch.qos.logback:logback-classic:1.4.14 → 1.5.6.
  • Move to new organization.

The compiled artifacts for the release (and all previous releases) are available on Maven Central.

Maven Modules


<dependency> <group>com.io7m.timehack6435126</group> <artifactId>com.io7m.timehack6435126.core</artifactId> <version>3.0.1</version> </dependency>

Previous Releases


The changelogs for the most recent previous releases are as follows:

3.0.0 Release (2022-04-10Z)

  • Require JDK 17 (Backwards incompatible)

2.0.0 Release (2017-11-15Z)

  • All modules are now Java 9 modules. JDK 9 is now required. (Backwards incompatible)

1.1.1 Release (2017-07-20Z)

  • Correct package exports in OSGi metadata.

1.1.0 Release (2017-07-20Z)

  • Rename project. Use the new primogenitor POM and 2017 project conventions. (Backwards incompatible)

Development Snapshots


At the time of writing, the current unstable development version of the package is 3.0.2-SNAPSHOT.

Development snapshots may be available in the Central Portal Snapshots repository. Snapshots are published to this repository every time the project is built by the project's continuous integration system, but snapshots do expire after around ninety days and so may or may not be available depending on when a build of the package was last triggered.

Manual


This project does not have any user manuals or other documentation beyond what might be present on the page above.

Sources


This project uses Git to manage source code.

Repository: https://www.github.com/io7m-com/timehack6435126

$ git clone --recursive https://www.github.com/io7m-com/timehack6435126

Issues


This project uses GitHub Issues to track issues.

License


Copyright © 2023 Mark Raynsford <code@io7m.com> https://www.io7m.com Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Last Updated 2025-08-09T14:58:47Z