Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for ParseDuration (0.34 sec)

  1. internal/config/api/api.go

    		return cfg, errors.New("invalid API max requests value")
    	}
    
    	requestsDeadline, err := time.ParseDuration(env.Get(EnvAPIRequestsDeadline, kvs.GetWithDefault(apiRequestsDeadline, DefaultKVS)))
    	if err != nil {
    		return cfg, err
    	}
    	cfg.RequestsDeadline = requestsDeadline
    
    	clusterDeadline, err := time.ParseDuration(env.Get(EnvAPIClusterDeadline, kvs.GetWithDefault(apiClusterDeadline, DefaultKVS)))
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/time/example_test.go

    	// d.Truncate( 10m0s) = 1h10m0s
    	// d.Truncate(1h0m0s) = 1h0m0s
    }
    
    func ExampleParseDuration() {
    	hours, _ := time.ParseDuration("10h")
    	complex, _ := time.ParseDuration("1h10m10s")
    	micro, _ := time.ParseDuration("1µs")
    	// The package also accepts the incorrect but common prefix u for micro.
    	micro2, _ := time.ParseDuration("1us")
    
    	fmt.Println(hours)
    	fmt.Println(complex)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/CacheBuilderSpec.java

          spec.recordStats = true;
        }
      }
    
      /** Base class for parsing times with durations */
      abstract static class DurationParser implements ValueParser {
        protected abstract void parseDuration(CacheBuilderSpec spec, long duration, TimeUnit unit);
    
        @Override
        public void parse(CacheBuilderSpec spec, String key, @CheckForNull String value) {
          if (isNullOrEmpty(value)) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Aug 22 14:27:44 UTC 2022
    - 18.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/CacheBuilderSpec.java

          spec.recordStats = true;
        }
      }
    
      /** Base class for parsing times with durations */
      abstract static class DurationParser implements ValueParser {
        protected abstract void parseDuration(CacheBuilderSpec spec, long duration, TimeUnit unit);
    
        @Override
        public void parse(CacheBuilderSpec spec, String key, @CheckForNull String value) {
          if (isNullOrEmpty(value)) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Aug 22 14:27:44 UTC 2022
    - 18.1K bytes
    - Viewed (0)
  5. pilot/pkg/networking/core/listener_builder.go

    		ConfigType: &listener.Filter_TypedConfig{TypedConfig: protoconv.MessageToAny(tcpProxy)},
    	})
    
    	return filterStack
    }
    
    func parseDuration(s string) *durationpb.Duration {
    	if s == "" {
    		return nil
    	}
    	t, err := time.ParseDuration(s)
    	if err != nil {
    		return nil
    	}
    	return durationpb.New(t)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 06 04:44:06 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  6. src/cmd/trace/tasks.go

    			return !task.Complete()
    		})
    	}
    	if lat, err := time.ParseDuration(r.FormValue("latmin")); err == nil {
    		name = append(name, fmt.Sprintf("latency >= %s", lat))
    		conditions = append(conditions, func(t *parsedTrace, task *trace.UserTaskSummary) bool {
    			return task.Complete() && taskInterval(t, task).duration() >= lat
    		})
    	}
    	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
    - 11.8K bytes
    - Viewed (0)
  7. pilot/pkg/networking/core/networkfilter.go

    	includeMx bool,
    ) []*listener.Filter {
    	idleTimeout := destinationRule.GetTrafficPolicy().GetConnectionPool().GetTcp().GetIdleTimeout()
    	if idleTimeout == nil {
    		idleTimeout = parseDuration(lb.node.Metadata.IdleTimeout)
    	}
    	tcpProxy := &tcp.TcpProxy{
    		StatPrefix:                      statPrefix,
    		ClusterSpecifier:                &tcp.TcpProxy_Cluster{Cluster: clusterName},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  8. 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)
  9. pkg/env/var.go

    	result, ok := os.LookupEnv(v.Name)
    	if !ok {
    		result = v.DefaultValue
    	}
    
    	d, err := time.ParseDuration(result)
    	if err != nil {
    		log.Warnf("Invalid environment variable value `%s`, expecting a duration, defaulting to %v", result, v.DefaultValue)
    		d, _ = time.ParseDuration(v.DefaultValue)
    	}
    
    	return d, ok
    }
    
    // Get retrieves the value of the environment variable.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  10. 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)
Back to top