code: func getMinTolerationTime(tolerations []v1.Toleration) time.Duration {
  	minTolerationTime := int64(-1)
  	if len(tolerations) == 0 {
  		return 0
  	}
  
  	for i := range tolerations {
  		if tolerations[i].TolerationSeconds != nil {
  			tolerationSeconds := *(tolerations[i].TolerationSeconds)
  			if tolerationSeconds <= 0 {
  				return 0
  			} else if tolerationSeconds < minTolerationTime || minTolerationTime == -1 {
  				minTolerationTime = tolerationSeconds
  			}
  		}
  	}
  
  	return time.Duration(minTolerationTime) * time.Second
  }
docs: // getMinTolerationTime returns minimal toleration time from the given slice, or -1 if it's infinite.