All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.launchdarkly.testhelpers.InternalHelpers Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.launchdarkly.testhelpers;

import java.util.concurrent.TimeUnit;

abstract class InternalHelpers {
  static TimeUnit timeUnit(TimeUnit unit) {
    return unit == null ? TimeUnit.MILLISECONDS : unit;
  }
  
  static String timeDesc(long value, TimeUnit unit) {
    String unitName = timeUnit(unit).name().toLowerCase();
    return String.format("%d %s", value, value == 1 ? unitName.substring(0, unitName.length() - 1) : unitName);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy