mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 10:35:16 +01:00
Fix the render-task displaying the wrong time after being paused or/and saved
This commit is contained in:
parent
fafc5c4a47
commit
7b9fbdf4ca
@ -94,6 +94,11 @@ public Collection<RenderTicket> createTickets(MapType mapType, Collection<Vector
|
||||
public boolean prioritizeRenderTask(RenderTask renderTask) {
|
||||
synchronized (renderTasks) {
|
||||
if (renderTasks.remove(renderTask)) {
|
||||
|
||||
//pause first task
|
||||
RenderTask currentFirst = renderTasks.peek();
|
||||
if (currentFirst != null) currentFirst.pause();
|
||||
|
||||
renderTasks.addFirst(renderTask);
|
||||
return true;
|
||||
}
|
||||
|
@ -104,6 +104,8 @@ public RenderTicket poll() {
|
||||
* It will resume as soon as a new ticket gets polled
|
||||
*/
|
||||
public void pause() {
|
||||
if (firstTileTime < 0) return;
|
||||
|
||||
synchronized (renderTiles) {
|
||||
additionalRunTime += System.currentTimeMillis() - firstTileTime;
|
||||
firstTileTime = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user