mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Undo previous calculation change. Move elapsed to start after drawing task for more accuracy.
This commit is contained in:
parent
2290627c5f
commit
98fe47d085
@ -78,7 +78,6 @@ public class Pregenerator implements Listener
|
|||||||
public Pregenerator(World world, int blockSize) throws HeadlessException
|
public Pregenerator(World world, int blockSize) throws HeadlessException
|
||||||
{
|
{
|
||||||
instance();
|
instance();
|
||||||
elapsed = M.ms();
|
|
||||||
latch = new ChronoLatch(5000);
|
latch = new ChronoLatch(5000);
|
||||||
memoryMetric = new AtomicReference<>("...");
|
memoryMetric = new AtomicReference<>("...");
|
||||||
method = new AtomicReference<>("STARTUP");
|
method = new AtomicReference<>("STARTUP");
|
||||||
@ -135,6 +134,8 @@ public class Pregenerator implements Listener
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
elapsed = M.ms();
|
||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
flushWorld();
|
flushWorld();
|
||||||
J.sleep(2000);
|
J.sleep(2000);
|
||||||
@ -473,7 +474,7 @@ public class Pregenerator implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String[] getProgress() {
|
public String[] getProgress() {
|
||||||
long eta = (long) ((totalChunks.get() - generated.get()) / perSecond.getAverage());
|
long eta = (long) ((totalChunks.get() - generated.get()) * ((double)(M.ms() - elapsed) / (double) generated.get()));
|
||||||
|
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"Progress: " + Form.f(generated.get()) + " of " + Form.f(totalChunks.get()) + " (" + Form.pc((double)generated.get() / (double)totalChunks.get(), 0) + ")",
|
"Progress: " + Form.f(generated.get()) + " of " + Form.f(totalChunks.get()) + " (" + Form.pc((double)generated.get() / (double)totalChunks.get(), 0) + ")",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user