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);
  } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE