code: func TTL(clock clockwork.Clock, expires time.Time) time.Duration {
  	ttl := expires.Sub(clock.Now())
  	if ttl < time.Second {
  		return time.Second
  	}
  	return ttl
  }
docs: // TTL returns TTL in duration units, rounds up to one second