getPreviousPrecision static method

int getPreviousPrecision(
  1. int precision
)

Implementation

static int getPreviousPrecision(int precision)
{
  int index = TimePrecision.values.indexOf(precision);
  if (index > 0) {
    return TimePrecision.values[index - 1];
  }
  else {
    return 0;
  }
}