Code example for TimeUnit

Methods: toMillis

0
  public void setTime(long millis) {
    time = millis;
  } 
 
  public void increment(long delta, TimeUnit unit) {
    time += unit.toMillis(delta);
  } 
} 
Experience pair programming with AI  Get Codota for Java