Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for maxDuration (0.12 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go

    */
    
    package request
    
    import (
    	"context"
    	"sync"
    	"time"
    
    	"k8s.io/utils/clock"
    )
    
    func sumDuration(d1 time.Duration, d2 time.Duration) time.Duration {
    	return d1 + d2
    }
    
    func maxDuration(d1 time.Duration, d2 time.Duration) time.Duration {
    	if d1 > d2 {
    		return d1
    	}
    	return d2
    }
    
    // DurationTracker is a simple interface for tracking functions duration,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 13 22:15:37 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. src/time/sleep_test.go

    	// but without slowing down fast machines unnecessarily.
    	//
    	// (maxDuration is several orders of magnitude longer than we
    	// expect this test to actually take on a fast, unloaded machine.)
    	d := 1 * Millisecond
    	const maxDuration = 10 * Second
    	for {
    		err := testReset(d)
    		if err == nil {
    			break
    		}
    		d *= 2
    		if d > maxDuration {
    			t.Error(err)
    		}
    		t.Logf("%v; trying duration %v", err, d)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:33:57 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  3. src/runtime/proc_test.go

    		// wait until all goroutines have finished.
    		for g := 0; g < nroutines; g++ {
    			<-c
    		}
    		duration := time.Since(start)
    
    		if duration > maxDuration {
    			t.Errorf("timeout exceeded: %v (%v)", duration, maxDuration)
    		}
    	}
    }
    
    func TestPreemptionAfterSyscall(t *testing.T) {
    	if runtime.GOOS == "plan9" {
    		testenv.SkipFlaky(t, 41015)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.8K bytes
    - Viewed (0)
Back to top