mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Use java 8 collection functions
This commit is contained in:
1 parent
9675585891
commit
8581225da8
19 files changed
+45
-142
No files matched your search
@@ -83,12 +83,7 @@ public class ForgeTimeTracker {
|
||||
// race, exit
|
||||
return;
|
||||
}
|
||||
int[] timings = tileEntityTimings.get(tileEntity);
|
||||
if (timings == null)
|
||||
{
|
||||
timings = new int[101];
|
||||
tileEntityTimings.put(tileEntity, timings);
|
||||
}
|
||||
int[] timings = tileEntityTimings.computeIfAbsent(tileEntity, k -> new int[101]);
|
||||
int idx = timings[100] = (timings[100] + 1) % 100;
|
||||
timings[idx] = (int) (nanoTime - timing);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user