Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for is_zero (0.42 sec)

  1. pkg/kubelet/util/node_startup_latency_tracker.go

    	n.lock.Lock()
    	defer n.lock.Unlock()
    
    	if !n.firstRegistrationAttemptTime.IsZero() {
    		return
    	}
    
    	n.firstRegistrationAttemptTime = n.clock.Now()
    }
    
    func (n *basicNodeStartupLatencyTracker) RecordRegisteredNewNode() {
    	n.lock.Lock()
    	defer n.lock.Unlock()
    
    	if n.firstRegistrationAttemptTime.IsZero() || !n.firstRegisteredNewNodeTime.IsZero() {
    		return
    	}
    
    	n.firstRegisteredNewNodeTime = n.clock.Now()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 05:54:25 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  2. src/net/netip/export_test.go

    	return Addr{u, z}
    }
    
    func IPv4(a, b, c, d uint8) Addr { return AddrFrom4([4]byte{a, b, c, d}) }
    
    var TestAppendToMarshal = testAppendToMarshal
    
    func (a Addr) IsZero() bool   { return a.isZero() }
    func (p Prefix) IsZero() bool { return p.isZero() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:14:15 UTC 2024
    - 730 bytes
    - Viewed (0)
  3. callbacks/update.go

    			if size := stmt.ReflectValue.Len(); size > 0 {
    				var isZero bool
    				for i := 0; i < size; i++ {
    					for _, field := range stmt.Schema.PrimaryFields {
    						_, isZero = field.ValueOf(stmt.Context, stmt.ReflectValue.Index(i))
    						if !isZero {
    							break
    						}
    					}
    				}
    
    				if !isZero {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 05:44:55 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    }
    
    // Now returns the current local time.
    func Now() Time {
    	return Time{time.Now()}
    }
    
    // IsZero returns true if the value is nil or time is zero.
    func (t *Time) IsZero() bool {
    	if t == nil {
    		return true
    	}
    	return t.Time.IsZero()
    }
    
    // Before reports whether the time instant t is before u.
    func (t *Time) Before(u *Time) bool {
    	if t != nil && u != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    }
    
    // NowMicro returns the current local time.
    func NowMicro() MicroTime {
    	return MicroTime{time.Now()}
    }
    
    // IsZero returns true if the value is nil or time is zero.
    func (t *MicroTime) IsZero() bool {
    	if t == nil {
    		return true
    	}
    	return t.Time.IsZero()
    }
    
    // Before reports whether the time instant t is before u.
    func (t *MicroTime) Before(u *MicroTime) bool {
    	if t != nil && u != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. pkg/kubelet/util/pod_startup_latency_tracker.go

    		// this is required, as we want to log metric only for those pods, that where scheduled
    		// after Kubelet started
    		if pod.Status.StartTime.IsZero() {
    			p.pods[pod.UID] = &perPodState{}
    		}
    
    		return
    	}
    
    	if state.observedRunningTime.IsZero() {
    		// skip, pod didn't start yet
    		return
    	}
    
    	if state.metricRecorded {
    		// skip, pod's latency already recorded
    		return
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 15 06:09:49 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  7. logger/sql.go

    		switch v := v.(type) {
    		case bool:
    			vars[idx] = strconv.FormatBool(v)
    		case time.Time:
    			if v.IsZero() {
    				vars[idx] = escaper + tmFmtZero + escaper
    			} else {
    				vars[idx] = escaper + v.Format(tmFmtWithMS) + escaper
    			}
    		case *time.Time:
    			if v != nil {
    				if v.IsZero() {
    					vars[idx] = escaper + tmFmtZero + escaper
    				} else {
    					vars[idx] = escaper + v.Format(tmFmtWithMS) + escaper
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 21 08:00:02 UTC 2024
    - 5K bytes
    - Viewed (0)
  8. cmd/erasure-coding.go

    // It only decodes the data blocks but does not verify them.
    // It returns an error if the decoding failed.
    func (e *Erasure) DecodeDataBlocks(data [][]byte) error {
    	isZero := 0
    	for _, b := range data {
    		if len(b) == 0 {
    			isZero++
    			break
    		}
    	}
    	if isZero == 0 || isZero == len(data) {
    		// If all are zero, payload is 0 bytes.
    		return nil
    	}
    	return e.encoder().ReconstructData(data)
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jan 31 02:11:45 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/meta/conditions.go

    	if existingCondition == nil {
    		if newCondition.LastTransitionTime.IsZero() {
    			newCondition.LastTransitionTime = metav1.NewTime(time.Now())
    		}
    		*conditions = append(*conditions, newCondition)
    		return true
    	}
    
    	if existingCondition.Status != newCondition.Status {
    		existingCondition.Status = newCondition.Status
    		if !newCondition.LastTransitionTime.IsZero() {
    			existingCondition.LastTransitionTime = newCondition.LastTransitionTime
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 22 01:13:33 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/telemetry/internal/upload/findwork.go

    			// skip
    		} else if strings.HasSuffix(fi.Name(), ".json") && mode == "on" {
    			// Collect reports that are ready for upload.
    			reportDate := u.uploadReportDate(fi.Name())
    			if !asof.IsZero() && !reportDate.IsZero() {
    				// If both the mode asof date and the report date are present, do the
    				// right thing...
    				//
    				// (see https://github.com/golang/go/issues/63142#issuecomment-1734025130)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:12:15 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top