-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Affects: io7m-com/.github#2
- Loading branch information
Showing
11 changed files
with
87 additions
and
567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
## timehack6435126 | ||
|
||
A high-resolutiom timer JVM bug workaround. | ||
|
||
## Features | ||
|
||
* Enables high-resolution timers in the JVM. | ||
* [OSGi-ready](https://www.osgi.org/) | ||
* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System) | ||
* 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
com.io7m.timehack6435126.documentation/src/main/assembly/documentation.xml
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...126.documentation/src/main/java/com/io7m/timehack6435126/documentation/Documentation.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...5126.documentation/src/main/java/com/io7m/timehack6435126/documentation/package-info.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
com.io7m.timehack6435126.documentation/src/main/java/module-info.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.