Fixed an issue with lag at the mainloop start

This commit is contained in:
josua 2019-08-02 14:07:02 +10:00
parent 964d6a706c
commit b23de9a3d4
1 changed files with 2 additions and 2 deletions

View File

@ -21,13 +21,13 @@ public class MainloopManager
// Initialize the variables // Initialize the variables
this.handler = handler; this.handler = handler;
this.tasks = new ArrayList<MainloopTask>(); this.tasks = new ArrayList<MainloopTask>();
this.timer = new MainloopTimer(handler);
} }
public void start() public void start()
{ {
// Set running to true // Set running to true and reset the timer
this.running = true; this.running = true;
this.timer = new MainloopTimer(this.handler);
// Call the on start function // Call the on start function
this.handler.onStart(); this.handler.onStart();