Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for ParseDuration (0.21 sec)

  1. src/flag/flag.go

    Integer flags accept 1234, 0664, 0x1234 and may be negative.
    Boolean flags may be:
    
    	1, 0, t, f, T, F, true, false, TRUE, FALSE, True, False
    
    Duration flags accept any input valid for time.ParseDuration.
    
    The default set of command-line flags is controlled by
    top-level functions.  The [FlagSet] type allows one to define
    independent sets of flags, such as to implement subcommands
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:38:24 UTC 2024
    - 39.7K bytes
    - Viewed (0)
  2. src/cmd/trace/regions.go

    	}
    
    	if lat, err := time.ParseDuration(r.FormValue("latmin")); err == nil {
    		name = append(name, fmt.Sprintf("(latency >= %s)", lat))
    		conditions = append(conditions, func(t *parsedTrace, r *trace.UserRegionSummary) bool {
    			return regionInterval(t, r).duration() >= lat
    		})
    		filterParams.Add("latmin", lat.String())
    	}
    	if lat, err := time.ParseDuration(r.FormValue("latmax")); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. cmd/admin-handlers.go

    	ctx := r.Context()
    
    	objectAPI, _ := validateAdminReq(ctx, w, r, policy.ServerInfoAdminAction)
    	if objectAPI == nil {
    		return
    	}
    	const defaultMetricsInterval = time.Second
    
    	interval, err := time.ParseDuration(r.Form.Get("interval"))
    	if err != nil || interval < time.Second {
    		interval = defaultMetricsInterval
    	}
    
    	n, err := strconv.Atoi(r.Form.Get("n"))
    	if err != nil || n <= 0 {
    		n = math.MaxInt32
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
  4. internal/config/identity/openid/openid.go

    // GetDefaultExpiration - returns the expiration seconds expected.
    func GetDefaultExpiration(dsecs string) (time.Duration, error) {
    	timeout := env.Get(config.EnvMinioStsDuration, "")
    	defaultExpiryDuration, err := time.ParseDuration(timeout)
    	if err != nil {
    		defaultExpiryDuration = time.Hour
    	}
    	if timeout == "" && dsecs != "" {
    		expirySecs, err := strconv.ParseInt(dsecs, 10, 64)
    		if err != nil {
    			return 0, auth.ErrInvalidDuration
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  5. internal/config/notify/parse.go

    		}
    		reconnectInterval, err := time.ParseDuration(env.Get(reconnectIntervalEnv,
    			kv.Get(target.MqttReconnectInterval)))
    		if err != nil {
    			return nil, err
    		}
    
    		keepAliveIntervalEnv := target.EnvMQTTKeepAliveInterval
    		if k != config.Default {
    			keepAliveIntervalEnv = keepAliveIntervalEnv + config.Default + k
    		}
    		keepAliveInterval, err := time.ParseDuration(env.Get(keepAliveIntervalEnv,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 46.4K bytes
    - Viewed (0)
  6. cmd/admin-handlers-site-replication.go

    // [POST] /minio/admin/v3/site-replication/netperf
    func (a adminAPIHandlers) SiteReplicationNetPerf(w http.ResponseWriter, r *http.Request) {
    	durationStr := r.Form.Get(peerRESTDuration)
    	duration, _ := time.ParseDuration(durationStr)
    	if duration < globalNetPerfMinDuration {
    		duration = globalNetPerfMinDuration
    	}
    	result := siteNetperf(r.Context(), duration)
    	adminLogIf(r.Context(), gob.NewEncoder(w).Encode(result))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  7. cmd/bucket-replication-handlers.go

    	resetID := r.URL.Query().Get("reset-id")
    	if resetID == "" {
    		resetID = mustGetUUID()
    	}
    	var (
    		days time.Duration
    		err  error
    	)
    	if durationStr != "" {
    		days, err = time.ParseDuration(durationStr)
    		if err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, InvalidArgument{
    				Bucket: bucket,
    				Err:    fmt.Errorf("invalid query parameter older-than %s for %s : %w", durationStr, bucket, err),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. src/testing/benchmark.go

    		if err != nil || n < 0 || (!f.allowZero && n == 0) {
    			return fmt.Errorf("invalid count")
    		}
    		*f = durationOrCountFlag{n: int(n)}
    		return nil
    	}
    	d, err := time.ParseDuration(s)
    	if err != nil || d < 0 || (!f.allowZero && d == 0) {
    		return fmt.Errorf("invalid duration")
    	}
    	*f = durationOrCountFlag{d: d}
    	return nil
    }
    
    // Global lock to ensure only one benchmark runs at a time.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
Back to top