/** * Sets the certificate to be valid immediately and until the specified duration has elapsed. * The precision of this field is seconds; further precision will be truncated. */ public Builder duration(long duration, TimeUnit unit) { long now = System.currentTimeMillis(); return validityInterval(now, now + unit.toMillis(duration)); }
/** * Sets the certificate to be valid immediately and until the specified duration has elapsed. * The precision of this field is seconds; further precision will be truncated. */ public Builder duration(long duration, TimeUnit unit) { long now = System.currentTimeMillis(); return validityInterval(now, now + unit.toMillis(duration)); }