toDurationUnit method

DurationUnit toDurationUnit()

Implementation

DurationUnit toDurationUnit() {
  switch (this) {
    case 's':
      return DurationUnit.s;
    case 'ms':
      return DurationUnit.ms;
  }
  throw Exception('$this is not known in enum DurationUnit');
}