static void Main(string[] args) { Task task = new Task(new Action(DoIt)); task.Start(); gameState.Run(); while (true) { gameState.ChangeFrame(); Thread.Sleep(120); } }