Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 120 for newTimer (0.25 sec)

  1. cmd/admin-handlers.go

    		// Start profiling locally as well.
    		prof, err := startProfiler(profiler)
    		if err == nil {
    			globalProfiler[profiler] = prof
    		}
    	}
    	globalProfilerMu.Unlock()
    
    	timer := time.NewTimer(duration)
    	defer timer.Stop()
    	for {
    		select {
    		case <-ctx.Done():
    			globalProfilerMu.Lock()
    			defer globalProfilerMu.Unlock()
    			for k, v := range globalProfiler {
    				v.Stop()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
  2. src/database/sql/sql.go

    	}
    }
    
    func (db *DB) connectionCleaner(d time.Duration) {
    	const minInterval = time.Second
    
    	if d < minInterval {
    		d = minInterval
    	}
    	t := time.NewTimer(d)
    
    	for {
    		select {
    		case <-t.C:
    		case <-db.cleanerCh: // maxLifetime was changed or db was closed.
    		}
    
    		db.mu.Lock()
    
    		d = db.shortestIdleTimeLocked()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  3. pkg/kubelet/stats/cri_stats_provider_windows.go

    		// The StartTime in the summary API is the container creation time.
    		StartTime: metav1.NewTime(time.Unix(0, container.CreatedAt)),
    		CPU:       &statsapi.CPUStats{},
    		Memory:    &statsapi.MemoryStats{},
    		Rootfs:    &statsapi.FsStats{},
    		// UserDefinedMetrics is not supported by CRI.
    	}
    	if stats.Cpu != nil {
    		result.CPU.Time = metav1.NewTime(time.Unix(0, stats.Cpu.Timestamp))
    		if stats.Cpu.UsageCoreNanoSeconds != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 07:03:11 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. pkg/controller/job/backoff_utils_test.go

    			storeInitializer: emptyStoreInitializer,
    			newSucceededPods: []metav1.Time{
    				metav1.NewTime(defaultTestTime.Add(-2 * time.Millisecond)),
    			},
    			newFailedPods: []metav1.Time{
    				defaultTestTime,
    				metav1.NewTime(defaultTestTime.Add(-4 * time.Millisecond)),
    				metav1.NewTime(defaultTestTime.Add(-3 * time.Millisecond)),
    				metav1.NewTime(defaultTestTime.Add(-1 * time.Millisecond)),
    			},
    			wantBackoffRecord: backoffRecord{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 07:46:41 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  5. pkg/kubelet/metrics/collectors/resource_metrics_test.go

    )
    
    func TestCollectResourceMetrics(t *testing.T) {
    	// a static timestamp: 2021-06-23 05:11:18.302091597 +0800
    	staticTimestamp := time.Unix(0, 1624396278302091597)
    	testTime := metav1.NewTime(staticTimestamp)
    	interestedMetrics := []string{
    		"scrape_error",
    		"resource_scrape_error",
    		"node_cpu_usage_seconds_total",
    		"node_memory_working_set_bytes",
    		"node_swap_usage_bytes",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 15.3K bytes
    - Viewed (1)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top