inMinutes method

int inMinutes()

Implementation

int inMinutes() {
  switch (this) {
    case TimeUnit.minutes:
      return 1;
    case TimeUnit.hours:
      return 60; // 60 minutes in an hour
    case TimeUnit.days:
      return 1440; // 24 hours * 60 minutes
    case TimeUnit.weeks:
      return 10080; // 7 days * 24 hours * 60 minutes
  }
}