wait method

Future wait([
  1. double duration = 1.0
])

Implementation

Future wait([double duration = 1.0]) async {
  var t = 0.0;

  while (t < duration) {
    var dt = await display.nextFrame();
    t += dt;

    updateMobjects(dt);
    updateFrame(dt);
  }
}