Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 112 for newTimer (0.28 sec)

  1. pkg/kubelet/stats/cri_stats_provider_windows_test.go

    		Name:      "c0",
    		StartTime: v1.NewTime(time.Unix(0, containerStartTime.Unix())),
    		CPU: &statsapi.CPUStats{
    			Time:                 v1.NewTime(time.Unix(0, cpuUsageTimestamp)),
    			UsageNanoCores:       toP(cpuUsageNanoCores),
    			UsageCoreNanoSeconds: toP(cpuUsageNanoSeconds),
    		},
    		Memory: &statsapi.MemoryStats{
    			Time:            v1.NewTime(time.Unix(0, memoryUsageTimestamp)),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 17 00:02:10 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  2. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/MonotonicClock.java

         * This ensures that all threads share a consistent time.
         */
        private long advance(long newTime) {
            while (true) {
                long current = currentTime.get();
                if (newTime <= current) {
                    return current;
                } else if (currentTime.compareAndSet(current, newTime)) {
                    return newTime;
                }
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. src/net/http/server.go

    		// Double and clamp for next time.
    		pollIntervalBase *= 2
    		if pollIntervalBase > shutdownPollIntervalMax {
    			pollIntervalBase = shutdownPollIntervalMax
    		}
    		return interval
    	}
    
    	timer := time.NewTimer(nextPollInterval())
    	defer timer.Stop()
    	for {
    		if srv.closeIdleConns() {
    			return lnerr
    		}
    		select {
    		case <-ctx.Done():
    			return ctx.Err()
    		case <-timer.C:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  4. pkg/controller/cronjob/utils_test.go

    		}
    	}
    }
    
    func TestMostRecentScheduleTime(t *testing.T) {
    	metav1TopOfTheHour := metav1.NewTime(*topOfTheHour())
    	metav1HalfPastTheHour := metav1.NewTime(*deltaTimeAfterTopOfTheHour(30 * time.Minute))
    	metav1MinuteAfterTopOfTheHour := metav1.NewTime(*deltaTimeAfterTopOfTheHour(1 * time.Minute))
    	oneMinute := int64(60)
    	tenSeconds := int64(10)
    
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 03:34:25 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  5. src/database/sql/sql_test.go

    			_, err := db.Exec("will never run")
    			errs <- err
    		}()
    	}
    
    	opening.Wait() // wait for all workers to begin running
    
    	const timeout = 5 * time.Second
    	to := time.NewTimer(timeout)
    	defer to.Stop()
    
    	// check that all connections fail without deadlock
    	for i := 0; i < tryOpen; i++ {
    		select {
    		case err := <-errs:
    			if got, want := err, errOffline; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  6. pkg/volume/util/resize_util_test.go

    			Status:             v1.ConditionTrue,
    			LastTransitionTime: currentTime,
    		},
    	}).get()
    
    	noConditionPVC := makePVC([]v1.PersistentVolumeClaimCondition{}).get()
    
    	conditionFalseTime := metav1.Now()
    	newTime := metav1.NewTime(time.Now().Add(1 * time.Hour))
    
    	testCases := []conditionMergeTestCase{
    		{
    			description:     "when removing all conditions",
    			pvc:             pvc.DeepCopy(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. cmd/site-replication.go

    func (c *SiteReplicationSys) startHealRoutine(ctx context.Context, objAPI ObjectLayer) {
    	ctx, cancel := globalLeaderLock.GetLock(ctx)
    	defer cancel()
    
    	healTimer := time.NewTimer(siteHealTimeInterval)
    	defer healTimer.Stop()
    
    	var maxRefreshDurationSecondsForLog float64 = 10 // 10 seconds..
    
    	for {
    		select {
    		case <-healTimer.C:
    			c.RLock()
    			enabled := c.enabled
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 184.3K bytes
    - Viewed (0)
  8. 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)
  9. pkg/kubelet/server/stats/summary_test.go

    	assert := assert.New(t)
    
    	podStats := []statsapi.PodStats{
    		{
    			PodRef:      statsapi.PodReference{Name: "test-pod", Namespace: "test-namespace", UID: "UID_test-pod"},
    			StartTime:   metav1.NewTime(time.Now()),
    			Containers:  []statsapi.ContainerStats{*getContainerStats()},
    			Network:     getNetworkStats(),
    			VolumeStats: []statsapi.VolumeStats{*getVolumeStats()},
    		},
    	}
    	cgroupStatsMap := map[string]struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go

    		}
    		if !reflect.DeepEqual(input, time) {
    			t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time)
    		}
    	}
    }
    
    func TestTimeEqual(t *testing.T) {
    	t1 := NewTime(time.Now())
    	cases := []struct {
    		name   string
    		x      *Time
    		y      *Time
    		result bool
    	}{
    		{"nil =? nil", nil, nil, true},
    		{"!nil =? !nil", &t1, &t1, true},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top