aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/renderer/LODRenderer.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2021-05-10 22:02:01 +0200
committermakamys <makamys@outlook.com>2021-05-10 22:02:01 +0200
commit6741084ce1cee8648edb4af418a879321a7de4c0 (patch)
tree752352aa738b6ad97010edb70d5b3ef11caf4733 /src/main/java/makamys/lodmod/renderer/LODRenderer.java
parentf3c2b5d401fb09824e66092ac0593849ae29ee6c (diff)
downloadNeodymium-6741084ce1cee8648edb4af418a879321a7de4c0.tar.gz
Neodymium-6741084ce1cee8648edb4af418a879321a7de4c0.tar.bz2
Neodymium-6741084ce1cee8648edb4af418a879321a7de4c0.zip
Change save interval to 60 seconds
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/LODRenderer.java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index 4b2e016..7578633 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -81,7 +81,9 @@ public class LODRenderer {
private double lastSortZ = Double.NaN;
private long lastGCTime = -1;
- private long gcInterval = 60 * 1000;
+ private long lastSaveTime = -1;
+ private long gcInterval = 10 * 1000;
+ private long saveInterval = 60 * 1000;
public int renderRange = 48;
@@ -105,12 +107,14 @@ public class LODRenderer {
mainLoop();
handleKeyboard();
- gcInterval = 10 * 1000;
if(lastGCTime == -1 || (System.currentTimeMillis() - lastGCTime) > gcInterval) {
runGC();
- onSave();
lastGCTime = System.currentTimeMillis();
}
+ if(lastSaveTime == -1 || (System.currentTimeMillis() - lastSaveTime) > saveInterval) {
+ onSave();
+ lastSaveTime = System.currentTimeMillis();
+ }
if(renderLOD) {
sort();