Fixed an issue with lag at the mainloop start
This commit is contained in:
parent
964d6a706c
commit
b23de9a3d4
|
|
@ -21,13 +21,13 @@ public class MainloopManager
|
|||
// Initialize the variables
|
||||
this.handler = handler;
|
||||
this.tasks = new ArrayList<MainloopTask>();
|
||||
this.timer = new MainloopTimer(handler);
|
||||
}
|
||||
|
||||
public void start()
|
||||
{
|
||||
// Set running to true
|
||||
// Set running to true and reset the timer
|
||||
this.running = true;
|
||||
this.timer = new MainloopTimer(this.handler);
|
||||
|
||||
// Call the on start function
|
||||
this.handler.onStart();
|
||||
|
|
|
|||
Loading…
Reference in New Issue