wait function
Implementation
Duration wait() {
if (timer == null || !timer!.isActive) {
timer = Timer(const Duration(microseconds: 120), () {
duration = Duration.zero;
});
}
return duration += const Duration(milliseconds: 100);
}