toggle method

void toggle()

开关

Implementation

void toggle() {
  started ? stop() : start();
}