Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 84 for timeFn (0.14 sec)

  1. pkg/controller/deployment/util/deployment_util_test.go

    			nowFn:    func() time.Time { return timeFn(1, 20) },
    			expected: true,
    		},
    		{
    			name: "progressDeadlineSeconds: 10s, now - started => 00:01:20 - 00:01:11 => 9s",
    
    			d:        deployment(apps.DeploymentProgressing, v1.ConditionTrue, "", &ten, timeFn(1, 11)),
    			nowFn:    func() time.Time { return timeFn(1, 20) },
    			expected: false,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 09:10:50 UTC 2023
    - 37.1K bytes
    - Viewed (0)
  2. src/runtime/time.go

    	return when
    }
    
    // check runs any timers in ts that are ready.
    // If now is not 0 it is the current time.
    // It returns the passed time or the current time if now was passed as 0.
    // and the time when the next timer should run or 0 if there is no next timer,
    // and reports whether it ran any timers.
    // If the time when the next timer should run is not 0,
    // it is always larger than the returned time.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/wait/loop_test.go

    		})
    	}
    }
    
    type timerWrapper struct {
    	timer   clock.Timer
    	resets  []time.Duration
    	onReset func(d time.Duration)
    }
    
    func (w *timerWrapper) C() <-chan time.Time { return w.timer.C() }
    func (w *timerWrapper) Stop() bool          { return w.timer.Stop() }
    func (w *timerWrapper) Reset(d time.Duration) bool {
    	w.resets = append(w.resets, d)
    	b := w.timer.Reset(d)
    	if w.onReset != nil {
    		w.onReset(d)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 02:48:08 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  4. src/time/sleep_test.go

    			}
    		case 6:
    			if timer.Reset(2 * Minute) {
    				panic("shouldn't be active (2)")
    			}
    
    		// Stop and drain a long-duration timer.
    		case 3, 5, 7:
    			if !timer.Stop() {
    				t.Logf("timer %d state %d Stop returned false", i, state)
    				<-timer.C
    			}
    
    		// Start a short-duration timer we expect to select without blocking.
    		case 8:
    			if timer.Reset(0) {
    				t.Fatal("timer.Reset returned true")
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:33:57 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/tests/FileAttributesTest.java

                        int diff = Math.abs((int) ( ( time / 1000 ) - ( f.lastModified() / 1000 ) ));
                        Assert.assertTrue("Have set time correctly", diff < 2);
                    }
                    else {
                        assertEquals(time, f.lastModified());
                        assertEquals(time, f.lastAccess());
                        assertEquals(time, f.createTime());
                    }
                }
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Thu Jan 05 13:09:03 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  6. src/testing/benchmark.go

    	if b.timerOn {
    		b.duration += highPrecisionTimeSince(b.start)
    		runtime.ReadMemStats(&memStats)
    		b.netAllocs += memStats.Mallocs - b.startAllocs
    		b.netBytes += memStats.TotalAlloc - b.startBytes
    		b.timerOn = false
    	}
    }
    
    // ResetTimer zeroes the elapsed benchmark time and memory allocation counters
    // and deletes user-reported metrics.
    // It does not affect whether the timer is running.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. src/time/tick_test.go

    	// from the timer/ticker channel after Reset.
    	// When using Go 1.23 sync timers/tickers, draining is never needed
    	// (that's the whole point of the sync timer/ticker change).
    	drain1 := func() {
    		for range drainTries {
    			select {
    			case <-C:
    				return
    			default:
    			}
    			Sleep(sched)
    		}
    	}
    
    	// drainAsync removes potential stale time values after Stop/Reset.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:10:37 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  8. src/runtime/netpoll.go

    	user    uint32    // user settable cookie
    	rseq    uintptr   // protects from stale read timers
    	rt      timer     // read deadline timer
    	rd      int64     // read deadline (a nanotime in the future, -1 when expired)
    	wseq    uintptr   // protects from stale write timers
    	wt      timer     // write deadline timer
    	wd      int64     // write deadline (a nanotime in the future, -1 when expired)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  9. pilot/pkg/bootstrap/istio_ca.go

    func (s *Server) handleCACertsFileWatch() {
    	var timerC <-chan time.Time
    	for {
    		select {
    		case <-timerC:
    			timerC = nil
    			handleEvent(s)
    
    		case event, ok := <-s.cacertsWatcher.Events:
    			if !ok {
    				log.Debug("plugin cacerts watch stopped")
    				return
    			}
    			if event.Has(fsnotify.Write) || event.Has(fsnotify.Create) {
    				if timerC == nil {
    					timerC = time.After(100 * time.Millisecond)
    				}
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 17:48:28 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  10. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/daemon/ProcessCrashHandlingIntegrationTest.groovy

        @Rule BlockingHttpServer server = new BlockingHttpServer()
    
        def setup() {
            server.start()
        }
    
        def "tears down the daemon process when the client disconnects and build does not cancel in a timely manner"() {
            buildFile << """
                task block {
                    doLast {
                        ${server.callFromBuild("block")}
                    }
                }
            """
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 12.1K bytes
    - Viewed (0)
Back to top