code: func InterruptableSleep(ctx context.Context, d time.Duration) error {
  	timer := time.NewTimer(d)
  
  	select {
  	case <-timer.C:
  		return nil
  	case <-ctx.Done():
  		return errors.New("sleep interrupted by context")
  	}
  }
docs: // InterruptableSleep sleep for the duration of the n'th wait cycle
  // in a way that can be interrupted by the context.  An error is returned
  // if the context cancels the sleep