code: func (s *Semaphore) AcquireWithin(n int, d time.Duration) bool {
  	ctx, cancel := context.WithTimeout(context.Background(), d)
  	defer cancel()
  
  	return s.AcquireContext(ctx, n)
  }
docs: // AcquireWithin is similar to AcquireMany() but cancels if duration elapses before getting the permits.
  // Returns true if successful and false if timeout occurs.