commit | 78b33afff724d2a2537a9237dbd2df08cddde6ab | [log] [tgz] |
---|---|---|
author | Andrey Loskutov <loskutov@gmx.de> | Fri Jul 16 10:44:31 2021 +0200 |
committer | Andrey Loskutov <loskutov@gmx.de> | Sat Jul 17 18:04:05 2021 -0400 |
tree | 7863a25ade9b08ed78fd4e76aacded61d427b971 | |
parent | b93e8e7aa7f03c32cddfd718807c825beac13107 [diff] |
Bug 574897 - Switch JobManager to nanoTime() and monotonic time Usage of System.currentTimeMillis() in Jobs framework is problematic, because System.currentTimeMillis() API depends on external time sources and may go backwards and forwards at any time, contrary to our "human" understanding of the "monotonic" time that can never go back. However, code responsible for scheduling and joining on jobs depends on time values delivered by that API and I assume may be confused if time goes backwards. Since Java 5, System.nanoTime() was added to allow better precision and less system dependent time measurements. While still not strictly monotonic, it is less problematic as System.currentTimeMillis(), because it is not depending on system time changes that could be made by user or by synchronization of local time with NTP server. This change switches JobManager and related code to use System.nanoTime() and introduces JobManager.now() as a source for monotonic non-negative time values independent on local time and consistent between multiple threads. Change-Id: I6e90b4c962318705062148c1929838885404ad26 Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/183139 Tested-by: Platform Bot <platform-bot@eclipse.org>
Thanks for your interest in this project.
Platform runtime provides the background componentns for Eclipse based applications.
Website: https://projects.eclipse.org/projects/eclipse.platform
For more information, refer to the Platform UI wiki page.
Contributions to Platform UI are most welcome. There are many ways to contribute, from entering high quality bug reports, to contributing code or documentation changes. For a complete guide, see the Platform UI - How to contribute wiki page page on the team wiki.
Several test plug-ins have a dependency to the Mockito and Hamcrest library. Please install them from the Orbit Download page
Currently the following versions are required:
You need Maven 3.3.1 installed. After this you can run the build via the following command:
mvn clean verify -Pbuild-individual-bundles
Information regarding source code management, builds, coding standards, and more.
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
This project uses Bugzilla to track ongoing development and issues.
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!
Contact the project developers via the project's “dev” list.