public void TestGame() { var form = new DX11Game(); form.GameLoopEvent += delegate { onEnterFrame(); if (getTotalTime() > testDuration) { form.Exit(); } }; form.Run(); printResults(); }