- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 134 for microsecond (0.24 sec)
-
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go
func (m *MicroTime) ProtoMicroTime() *Timestamp { if m == nil { return &Timestamp{} } // truncate precision to microseconds to match JSON marshaling/unmarshaling truncatedNanoseconds := time.Duration(m.Time.Nanosecond()).Truncate(time.Microsecond) return &Timestamp{ Seconds: m.Time.Unix(), Nanos: int32(truncatedNanoseconds), } } // Size implements the protobuf marshalling interface.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 02 08:21:04 UTC 2022 - 2.3K bytes - Viewed (0) -
pkg/queue/instance_test.go
"time" "go.uber.org/atomic" "istio.io/istio/pkg/test/util/assert" "istio.io/istio/pkg/test/util/retry" ) func TestOrdering(t *testing.T) { numValues := 1000 q := NewQueue(1 * time.Microsecond) stop := make(chan struct{}) defer close(stop) wg := sync.WaitGroup{} wg.Add(numValues) mu := sync.Mutex{} out := make([]int, 0) for i := 0; i < numValues; i++ { i := i
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jul 21 16:30:36 UTC 2023 - 3.4K bytes - Viewed (0) -
tests/test_datetime_custom_encoder.py
class ModelWithDatetimeField(BaseModel): dt_field: datetime @field_serializer("dt_field") def serialize_datetime(self, dt_field: datetime): return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat() app = FastAPI() model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8)) @app.get("/model", response_model=ModelWithDatetimeField) def get_model():
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/go/internal/trace/trace.go
ID: id, Time: float64(from.end.UnixNano()) / float64(time.Microsecond), Phase: phaseFlowStart, TID: from.tid, }) tc.t.writeEvent(&format.Event{ Name: from.name + " -> " + to.name, Category: "flow", // TODO(matloob): Add Category to Flow? ID: id, Time: float64(to.start.UnixNano()) / float64(time.Microsecond), Phase: phaseFlowEnd, TID: to.tid,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 20:45:06 UTC 2023 - 4.7K bytes - Viewed (0) -
pkg/test/echo/common/util.go
} // MicrosToDuration converts the given microseconds to a time.Duration. func MicrosToDuration(micros int64) time.Duration { return time.Duration(micros) * time.Microsecond } // DurationToMicros converts the given duration to microseconds. func DurationToMicros(d time.Duration) int64 { return int64(d / time.Microsecond)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 01 01:05:45 UTC 2022 - 2.6K bytes - Viewed (0) -
pkg/queue/metrics_test.go
import ( "sync" "testing" "time" "istio.io/istio/pilot/pkg/features" ) func BenchmarkMetricsQueue(b *testing.B) { features.EnableControllerQueueMetrics = true q := NewQueue(1 * time.Microsecond) s := make(chan struct{}) go q.Run(s) for n := 0; n < b.N; n++ { wg := sync.WaitGroup{} wg.Add(1) q.Push(func() error { wg.Done() return nil }) wg.Wait() } close(s)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jul 21 16:30:36 UTC 2023 - 1.7K bytes - Viewed (0) -
pkg/apis/core/validation/events.go
allErrs = append(allErrs, ValidateImmutableField(newEvent.Type, oldEvent.Type, field.NewPath("type"))...) // Disallow changes to eventTime greater than microsecond-level precision. // Tolerating sub-microsecond changes is required to tolerate updates // from clients that correctly truncate to microsecond-precision when serializing, // or from clients built with incorrect nanosecond-precision protobuf serialization.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Sep 01 19:47:37 UTC 2022 - 9.2K bytes - Viewed (0) -
pkg/backoff/exponential_test.go
start time.Time } func (c *TestClock) Now() time.Time { t := c.start.Add(c.i) c.i += time.Second return t } func TestRetry(t *testing.T) { o := DefaultOption() o.InitialInterval = 1 * time.Microsecond ebf := NewExponentialBackOff(o) // Run a task that fails the first time and retries. wg := sync.WaitGroup{} wg.Add(2) failed := false err := ebf.RetryWithContext(context.TODO(), func() error {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Sep 05 16:03:30 UTC 2022 - 2.6K bytes - Viewed (0) -
pkg/kubelet/cm/helpers_linux_test.go
} func TestResourceConfigForPodWithCustomCPUCFSQuotaPeriod(t *testing.T) { defaultQuotaPeriod := uint64(100 * time.Millisecond / time.Microsecond) // in microseconds tunedQuotaPeriod := uint64(5 * time.Millisecond / time.Microsecond) // in microseconds tunedQuota := int64(1 * time.Millisecond / time.Microsecond) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.CPUCFSQuotaPeriod, true)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 27.8K bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/msan8.go
go func() { defer func() { c <- true }() C.msanGoLoop() }() for C.msanGoReady() == 0 { time.Sleep(time.Microsecond) } loop: for { select { case <-c: break loop default: C.msanGoSendSignal() time.Sleep(time.Microsecond) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:30:58 UTC 2023 - 2.7K bytes - Viewed (0)