- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for newTimer (0.16 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go
// So we will be simply closing the channel, and synchronizing on the WaitGroup. stopCh: stopCh, clock: config.Clock, timer: time.NewTimer(time.Duration(0)), bookmarkWatchers: newTimeBucketWatchers(config.Clock, defaultBookmarkFrequency), } // Ensure that timer is stopped. if !cacher.timer.Stop() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 51.8K bytes - Viewed (0) -
src/time/time_test.go
// and that we also don't panic. func TestConcurrentTimerReset(t *testing.T) { const goroutines = 8 const tries = 1000 var wg sync.WaitGroup wg.Add(goroutines) timer := NewTimer(Hour) for i := 0; i < goroutines; i++ { go func(i int) { defer wg.Done() for j := 0; j < tries; j++ { timer.Reset(Hour + Duration(i*j)) } }(i) } wg.Wait() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:13:47 UTC 2024 - 56.5K bytes - Viewed (0) -
src/net/http/transport.go
func (pc *persistConn) waitForContinue(continueCh <-chan struct{}) func() bool { if continueCh == nil { return nil } return func() bool { timer := time.NewTimer(pc.t.ExpectContinueTimeout) defer timer.Stop() select { case _, ok := <-continueCh: return ok case <-timer.C: return true case <-pc.closech: return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
cmd/iam.go
// Calculate a random value such that 0 <= value < baseInterval randAmt := time.Duration(r.Float64() * float64(baseInterval)) return baseInterval/2 + randAmt } timer := time.NewTimer(waitInterval()) defer timer.Stop() for { select { case <-timer.C: // Load all IAM items (except STS creds) periodically. refreshStart := time.Now()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jun 13 22:26:38 UTC 2024 - 71.9K bytes - Viewed (0) -
pkg/controller/endpoint/endpoints_controller_test.go
} // waitForChanReceive blocks up to the timeout waiting for the receivingChan to receive func waitForChanReceive(t *testing.T, timeout time.Duration, receivingChan chan struct{}, errorMsg string) { timer := time.NewTimer(timeout) select { case <-timer.C: t.Errorf(errorMsg) case <-receivingChan: } } func TestEndpointSubsetsEqualIgnoreResourceVersion(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 26 06:51:56 UTC 2024 - 87.7K bytes - Viewed (0) -
src/cmd/internal/testdir/testdir_test.go
// common problem here, it would be worth porting over // that code as well. See https://do.dev/issue/50973 // for more discussion. if err == nil { tick := time.NewTimer(time.Duration(tim) * time.Second) done := make(chan error) go func() { done <- cmd.Wait() }() select { case err = <-done: // ok case <-tick.C:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:08:06 UTC 2024 - 57.5K bytes - Viewed (0) -
pkg/kubelet/nodestatus/setters_test.go
LastTransitionTime: metav1.NewTime(transition), LastHeartbeatTime: metav1.NewTime(heartbeat), } } return &v1.NodeCondition{ Type: v1.NodeReady, Status: v1.ConditionFalse, Reason: "KubeletNotReady", Message: message, LastTransitionTime: metav1.NewTime(transition), LastHeartbeatTime: metav1.NewTime(heartbeat), } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 21:47:24 UTC 2024 - 76.1K bytes - Viewed (0) -
pkg/kubelet/stats/cri_stats_provider_test.go
workingSetBytes := uint64(seed + offsetCRI + offsetMemWorkingSetBytes) podStats.CPU = &statsapi.CPUStats{ Time: metav1.NewTime(timestamp), UsageCoreNanoSeconds: &usageCoreNanoSeconds, } podStats.Memory = &statsapi.MemoryStats{ Time: metav1.NewTime(timestamp), WorkingSetBytes: &workingSetBytes, } } return podStats }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 54.5K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go
v1.ResourceMemory: "500", } epochTime = metav1.NewTime(time.Unix(0, 0)) epochTime1 = metav1.NewTime(time.Unix(0, 1)) epochTime2 = metav1.NewTime(time.Unix(0, 2)) epochTime3 = metav1.NewTime(time.Unix(0, 3)) epochTime4 = metav1.NewTime(time.Unix(0, 4)) epochTime5 = metav1.NewTime(time.Unix(0, 5)) epochTime6 = metav1.NewTime(time.Unix(0, 6)) )
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 31 15:52:16 UTC 2024 - 82.8K bytes - Viewed (0) -
pkg/controller/job/job_controller.go
return &batch.JobCondition{ Type: conditionType, Status: status, LastProbeTime: metav1.NewTime(now), LastTransitionTime: metav1.NewTime(now), Reason: reason, Message: message, } } // getFailJobMessage returns a job failure message if the job should fail with the current counters
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 23:56:37 UTC 2024 - 77.6K bytes - Viewed (0)