method start


void start(void callback(), [Duration wait])

Starts the job. If the job is already running, it will stop first.

Source

void start(void callback(), [Duration wait]) {
  stop();
  _callback = callback;
  if (wait == null) {
    _id = window.requestAnimationFrame((_) => complete());
  } else {
    _timer = new Timer(wait, complete);
  }
}