NOVA-Team / NOVA-Monorepo

The core API of the NOVA voxel game modding system
https://nova-team.github.io
GNU Lesser General Public License v3.0
66 stars 23 forks source link

Replace `System.currentTimeMillis()` with `System.nanoTime()` #305

Closed ExE-Boss closed 7 years ago

ExE-Boss commented 7 years ago

As explained here:

System.currentTimeMillis() returns the time of the system clock, which can also change backwards when the system time changes, it's also affected by leap seconds.

System.nanoTime() on the other hand returns the internal time of the Java Virtual Machine which does not depend on the system clock, so it's guaranteed that its value grows only from the past to the future.

codecov-io commented 7 years ago

Codecov Report

Merging #305 into master will not change coverage. The diff coverage is 23.07%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #305   +/-   ##
========================================
  Coverage      16.4%   16.4%           
  Complexity      931     931           
========================================
  Files           414     414           
  Lines         13140   13140           
  Branches       1377    1377           
========================================
  Hits           2156    2156           
  Misses        10840   10840           
  Partials        144     144
Impacted Files Coverage Δ Complexity Δ
...e/v17/wrapper/recipes/MinecraftRecipeRegistry.java 0% <0%> (ø) 0 <0> (ø) :arrow_down:
...e/v18/wrapper/recipes/MinecraftRecipeRegistry.java 0% <0%> (ø) 0 <0> (ø) :arrow_down:
...apper/mc/forge/v18/manager/MCRetentionManager.java 4.25% <33.33%> (ø) 1 <0> (ø) :arrow_down:
...ain/java/nova/internal/core/tick/UpdateTicker.java 15.21% <33.33%> (ø) 1 <0> (ø) :arrow_down:
...apper/mc/forge/v17/manager/MCRetentionManager.java 4.25% <33.33%> (ø) 1 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update db3f896...4000f84. Read the comment docs.