Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 388 for is_zero (0.24 sec)

  1. 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)
  2. cmd/bucket-metadata.go

    func (b *BucketMetadata) defaultTimestamps() {
    	if b.PolicyConfigUpdatedAt.IsZero() {
    		b.PolicyConfigUpdatedAt = b.Created
    	}
    
    	if b.EncryptionConfigUpdatedAt.IsZero() {
    		b.EncryptionConfigUpdatedAt = b.Created
    	}
    
    	if b.TaggingConfigUpdatedAt.IsZero() {
    		b.TaggingConfigUpdatedAt = b.Created
    	}
    
    	if b.ObjectLockConfigUpdatedAt.IsZero() {
    		b.ObjectLockConfigUpdatedAt = b.Created
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  3. src/cmd/internal/test2json/testdata/framefuzz.test

        inlining_test.go:102: not in expected set, but also inlinable: "mask6"
        inlining_test.go:102: not in expected set, but also inlinable: "AddrPort.isZero"
        inlining_test.go:102: not in expected set, but also inlinable: "stringsLastIndexByte"
        inlining_test.go:102: not in expected set, but also inlinable: "Addr.isZero"
        inlining_test.go:102: not in expected set, but also inlinable: "bePutUint32"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 19:50:36 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  4. test/typeparam/issue48276a.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "fmt"
    
    func main() {
    	IsZero[int](0)
    }
    
    func IsZero[T comparable](val T) bool {
    	var zero T
    	fmt.Printf("%v:%v\n", zero, val)
    	return val != zero
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 337 bytes
    - Viewed (0)
  5. 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)
  6. pkg/kubelet/util/node_startup_latency_tracker_test.go

    		assert.Equal(t, frozenTime, tracker.kubeletStartTime)
    		assert.True(t, tracker.firstRegistrationAttemptTime.IsZero())
    		assert.True(t, tracker.firstRegisteredNewNodeTime.IsZero())
    		assert.True(t, tracker.firstNodeReadyTime.IsZero())
    	})
    }
    
    func TestRecordAllTimestamps(t *testing.T) {
    	t.Run("all timestamps are recorded", func(t *testing.T) {
    		metrics.Register()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 05:54:25 UTC 2023
    - 18K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/lifecycle.go

    func (lc Lifecycle) eval(obj ObjectOpts, now time.Time) Event {
    	var events []Event
    	if obj.ModTime.IsZero() {
    		return Event{}
    	}
    
    	// Handle expiry of restored object; NB Restored Objects have expiry set on
    	// them as part of RestoreObject API. They aren't governed by lifecycle
    	// rules.
    	if !obj.RestoreExpires.IsZero() && now.After(obj.RestoreExpires) {
    		action := DeleteRestoredAction
    		if !obj.IsLatest {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. 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)
  9. pkg/kubelet/server/stats/summary_sys_containers.go

    		s.Logs, s.Rootfs = nil, nil
    		s.Name = sys
    
    		// if we know the start time of a system container, use that instead of the start time provided by cAdvisor
    		if !cont.startTime.IsZero() {
    			s.StartTime = cont.startTime
    		}
    		stats = append(stats, *s)
    	}
    
    	return stats
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  10. cmd/object-handlers-common.go

    	if r.Method != http.MethodPut {
    		return false
    	}
    	// If the object doesn't have a modtime (IsZero), or the modtime
    	// is obviously garbage (Unix time == 0), then ignore modtimes
    	// and don't process the If-Modified-Since header.
    	if objInfo.ModTime.IsZero() || objInfo.ModTime.Equal(time.Unix(0, 0)) {
    		return false
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 14.6K bytes
    - Viewed (0)
Back to top