- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 388 for is_zero (0.16 sec)
-
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) -
pkg/kubelet/cm/devicemanager/endpoint.go
stopTime: time.Now(), } } func (e *endpointImpl) isStopped() bool { e.mutex.Lock() defer e.mutex.Unlock() return !e.stopTime.IsZero() } func (e *endpointImpl) stopGracePeriodExpired() bool { e.mutex.Lock() defer e.mutex.Unlock() return !e.stopTime.IsZero() && time.Since(e.stopTime) > endpointStopGracePeriod } func (e *endpointImpl) setStopTime(t time.Time) { e.mutex.Lock() defer e.mutex.Unlock()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 02 11:05:20 UTC 2022 - 3.9K bytes - Viewed (0) -
src/cmd/internal/test2json/testdata/framefuzz.json
{"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"stringsLastIndexByte\"\n"} {"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"Addr.isZero\"\n"}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 17:33:07 UTC 2022 - 6.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storageversion/updater_test.go
sv := &v1alpha1.StorageVersion{Status: tc.old} SetCommonEncodingVersion(sv) if (tc.expectLastTransitionTimeUpdate && sv.Status.Conditions[0].LastTransitionTime.IsZero()) || (!tc.expectLastTransitionTimeUpdate && !sv.Status.Conditions[0].LastTransitionTime.IsZero()) { t.Errorf("unexpected LastTransitionTime, expected update: %v, got: %v", tc.expectLastTransitionTimeUpdate, sv.Status.Conditions[0].LastTransitionTime) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 22:40:54 UTC 2023 - 8.7K bytes - Viewed (0) -
src/net/netip/uint128.go
func mask6(n int) uint128 { return uint128{^(^uint64(0) >> n), ^uint64(0) << (128 - n)} } // isZero reports whether u == 0. // // It's faster than u == (uint128{}) because the compiler (as of Go // 1.15/1.16b1) doesn't do this trick and instead inserts a branch in // its eq alg's generated code. func (u uint128) isZero() bool { return u.hi|u.lo == 0 } // and returns the bitwise AND of u and m (u&m).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 07 21:28:44 UTC 2022 - 2.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/rest/meta_test.go
func TestWipeObjectMetaSystemFields(t *testing.T) { resource := metav1.ObjectMeta{} WipeObjectMetaSystemFields(&resource) if !resource.CreationTimestamp.Time.IsZero() { t.Errorf("resource.CreationTimestamp is set") } if len(resource.UID) != 0 { t.Errorf("resource.UID is set") } if resource.DeletionTimestamp != nil { t.Errorf("resource.DeletionTimestamp is set") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jun 19 01:47:23 UTC 2022 - 3.8K bytes - Viewed (0) -
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) -
src/net/netip/netip_pkg_test.go
mustIP("0.0.0.0"), mustIP("::"), } { got := ip.Prev() if !got.isZero() { t.Errorf("IP(%v).Prev = %v; want zero", ip, got) } } var allFF [16]byte for i := range allFF { allFF[i] = 0xff } for _, ip := range []Addr{ mustIP("255.255.255.255"), AddrFrom16(allFF), } { got := ip.Next() if !got.isZero() { t.Errorf("IP(%v).Next = %v; want zero", ip, got) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 02 15:37:19 UTC 2023 - 9K bytes - Viewed (0) -
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) -
cmd/rebalance-admin.go
elapsed := time.Since(ps.Info.StartTime) eta := time.Duration(totalBytesToRebal * float64(elapsed) / float64(ps.Bytes)) if !ps.Info.EndTime.IsZero() { stopTime = ps.Info.EndTime } if !stopTime.IsZero() { // rebalance is stopped or completed elapsed = stopTime.Sub(ps.Info.StartTime) eta = 0 } r.Pools[i].Progress = rebalPoolProgress{ NumObjects: ps.NumObjects,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Dec 22 00:56:43 UTC 2023 - 3.8K bytes - Viewed (0)