Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ParseDuration (0.48 sec)

  1. src/time/time_test.go

    }
    
    func TestParseDurationErrors(t *testing.T) {
    	for _, tc := range parseDurationErrorTests {
    		_, err := ParseDuration(tc.in)
    		if err == nil {
    			t.Errorf("ParseDuration(%q) = _, nil, want _, non-nil", tc.in)
    		} else if !strings.Contains(err.Error(), tc.expect) {
    			t.Errorf("ParseDuration(%q) = _, %q, error does not contain %q", tc.in, err, tc.expect)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  2. cmd/peer-rest-server.go

    	if err != nil {
    		size = 64 * humanize.MiByte
    	}
    
    	concurrent, err := strconv.Atoi(concurrentStr)
    	if err != nil {
    		concurrent = 32
    	}
    
    	duration, err := time.ParseDuration(durationStr)
    	if err != nil {
    		duration = time.Second * 10
    	}
    
    	done := keepHTTPResponseAlive(w)
    
    	result, err := selfSpeedTest(r.Context(), speedTestOpts{
    		objectSize:      size,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  3. src/time/format.go

    	"m":  uint64(Minute),
    	"h":  uint64(Hour),
    }
    
    // ParseDuration parses a duration string.
    // A duration string is a possibly signed sequence of
    // decimal numbers, each with optional fraction and a unit suffix,
    // such as "300ms", "-1.5h" or "2h45m".
    // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
    func ParseDuration(s string) (Duration, error) {
    	// [-+]?([0-9]*(\.[0-9]*)?[a-z]+)+
    	orig := s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  4. pilot/pkg/config/kube/gateway/conversion.go

    			}
    		}
    	}
    
    	if r.Timeouts != nil {
    		if r.Timeouts.Request != nil {
    			request, _ := time.ParseDuration(string(*r.Timeouts.Request))
    			if request != 0 {
    				vs.Timeout = durationpb.New(request)
    			}
    		}
    		if r.Timeouts.BackendRequest != nil {
    			backendRequest, _ := time.ParseDuration(string(*r.Timeouts.BackendRequest))
    			if backendRequest != 0 {
    				timeout := durationpb.New(backendRequest)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 84.7K bytes
    - Viewed (0)
  5. pkg/kubelet/eviction/helpers.go

    	for signal, val := range statements {
    		signal := evictionapi.Signal(signal)
    		if !validSignal(signal) {
    			return nil, fmt.Errorf(unsupportedEvictionSignal, signal)
    		}
    		gracePeriod, err := time.ParseDuration(val)
    		if err != nil {
    			return nil, err
    		}
    		if gracePeriod < 0 {
    			return nil, fmt.Errorf("invalid eviction grace period specified: %v, must be a positive value", val)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 18:46:33 UTC 2023
    - 53.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/testdata/swagger.json

              "type": "string"
            },
            "id": { "type": "string" },
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 13 18:37:59 UTC 2023
    - 55.4K bytes
    - Viewed (0)
Back to top