Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 502 for timerC (0.21 sec)

  1. pkg/kube/inject/watcher.go

    		watcher:    watcher,
    		configFile: configFile,
    		valuesFile: valuesFile,
    	}, nil
    }
    
    func (w *fileWatcher) Run(stop <-chan struct{}) {
    	defer w.watcher.Close()
    	var timerC <-chan time.Time
    	for {
    		select {
    		case <-timerC:
    			timerC = nil
    			sidecarConfig, valuesConfig, err := w.Get()
    			if err != nil {
    				log.Errorf("update error: %v", err)
    				break
    			}
    			if w.handler != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  2. pkg/config/mesh/watcher.go

    // per event.
    func addFileWatcher(fileWatcher filewatcher.FileWatcher, file string, callback func()) {
    	_ = fileWatcher.Add(file)
    	go func() {
    		var timerC <-chan time.Time
    		for {
    			select {
    			case <-timerC:
    				timerC = nil
    				callback()
    			case <-fileWatcher.Events(file):
    				// Use a timer to debounce configuration updates
    				if timerC == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Dec 20 18:33:38 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  3. 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)
  4. staging/src/k8s.io/apimachinery/pkg/util/wait/timer.go

    type Timer interface {
    	// C returns a channel that will receive a struct{} each time the timer fires.
    	// The channel should not be waited on after Stop() is invoked. It is allowed
    	// to cache the returned value of C() for the lifetime of the Timer.
    	C() <-chan time.Time
    	// Next is invoked by wait functions to signal timers that the next interval
    	// should begin. You may only use Next() if you have drained the channel C().
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  5. 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)
  6. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/Timer.java

     */
    
    package org.gradle.internal.time;
    
    public interface Timer {
    
        /**
         * @return A human-consumable description of the elapsed time.
         */
        String getElapsed();
    
        /**
         * Return the elapsed time in ms. Returned value is always &gt;= 0.
         * @return The elapsed time, in ms.
         */
        long getElapsedMillis();
    
        /**
         * Restart this timer. Sets elapsed time to zero.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 1K bytes
    - Viewed (0)
  7. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/Time.java

         * and are therefore not synchronized with {@link #clock()} or the system wall clock.
         *
         * System.nanoTime() does not consider time elapsed while the system is in hibernation.
         * Therefore, timers effectively measure the elapsed time, of which the system was awake.
         */
        public static Timer startTimer() {
            return new DefaultTimer(TimeSource.SYSTEM);
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  8. src/time/sleep.go

    // A Timer must be created with [NewTimer] or AfterFunc.
    type Timer struct {
    	C         <-chan Time
    	initTimer bool
    }
    
    // Stop prevents the [Timer] from firing.
    // It returns true if the call stops the timer, false if the timer has already
    // expired or been stopped.
    //
    // For a func-based timer created with [AfterFunc](d, f),
    // if t.Stop returns false, then the timer has already expired
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:30 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/util/wait/loop.go

    //
    // This is the common loop construct for all polling in the wait package.
    func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding bool, condition ConditionWithContextFunc) error {
    	defer t.Stop()
    
    	var timeCh <-chan time.Time
    	doneCh := ctx.Done()
    
    	if !sliding {
    		timeCh = t.C()
    	}
    
    	// if immediate is true the condition is
    	// guaranteed to be executed at least once,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 02:47:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  10. 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)
Back to top