Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 8,625 for tims (0.73 sec)

  1. src/time/tick_test.go

    			t.Setenv("GODEBUG", "asynctimerchan="+name)
    			t.Run("Timer", func(t *testing.T) {
    				tim := NewTimer(10000 * Second)
    				testTimerChan(t, tim, tim.C, name == "0")
    			})
    			t.Run("Ticker", func(t *testing.T) {
    				tim := &tickerTimer{Ticker: NewTicker(10000 * Second)}
    				testTimerChan(t, tim, tim.C, name == "0")
    			})
    		})
    	}
    }
    
    type timer interface {
    	Stop() bool
    	Reset(Duration) bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:10:37 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  2. pkg/test/loadbalancersim/timeseries/instance.go

    	defer ts.mutex.Unlock()
    	return ts.data.Copy(), ts.times.asDurationSinceEpoch(epoch)
    }
    
    type times []time.Time
    
    func (t times) copy() times {
    	out := make(times, 0, len(t))
    	out = append(out, t...)
    	return out
    }
    
    func (t times) asDurationSinceEpoch(epoch time.Time) []time.Duration {
    	out := make([]time.Duration, 0, len(t))
    	for _, tm := range t {
    		out = append(out, tm.Sub(epoch))
    	}
    	return out
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 03 18:19:25 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/cgo.go

    			times = append(times, time.Since(start))
    		case <-time.After(time.Second):
    			fmt.Printf("HANG 1 %v\n", times)
    			return
    		}
    	}
    	ping <- true
    	select {
    	case <-ping:
    	case <-time.After(time.Second):
    		fmt.Printf("HANG 2 %v\n", times)
    		return
    	}
    	fmt.Printf("OK\n")
    }
    
    func CgoTraceback() {
    	C.foo1()
    	buf := make([]byte, 1)
    	runtime.Stack(buf, true)
    	fmt.Printf("OK\n")
    }
    
    func CgoCheckBytes() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 13:20:27 UTC 2017
    - 1.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/topological_sort.h

    // if (and only if) op1 is in extra_dependencies(op2, true), then op2
    // must also be in extra_dependencies(op1, false).
    // This function is called multiple times during the topological sort,
    // so the implementation should preferably be constant-time.
    typedef llvm::function_ref<llvm::SmallVector<Operation *, 4> const &(
        Operation *, bool incoming)>
        ExtraDependenciesFunction;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 08 17:01:11 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake_event_clock_test.go

    	const batchSize = 100
    	times := make(chan time.Time, batchSize+1)
    	try := func(abs, strict bool, d time.Duration) {
    		f := func(u time.Time) {
    			realD := ec.Since(now)
    			atomic.AddInt32(&numDone, 1)
    			times <- u
    			if realD < d || strict && strictable && realD > d+fuzz {
    				t.Errorf("Asked for %v, got %v", d, realD)
    			}
    		}
    		if abs {
    			ec.EventAfterTime(f, now.Add(d))
    		} else {
    			ec.EventAfterDuration(f, d)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 07 04:07:31 UTC 2021
    - 3.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/eventclock/real_event_clock_test.go

    import (
    	"math/rand"
    	"sync/atomic"
    	"testing"
    	"time"
    )
    
    func TestRealEventClock(t *testing.T) {
    	ec := Real{}
    	var numDone int32
    	now := ec.Now()
    	const batchSize = 100
    	times := make(chan time.Time, batchSize+1)
    	try := func(abs bool, d time.Duration) {
    		f := func(u time.Time) {
    			realD := ec.Since(now)
    			atomic.AddInt32(&numDone, 1)
    			times <- u
    			if realD < d {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 07 04:07:31 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfields.go

    type ManagedInterface interface {
    	// Fields gets the fieldpath.ManagedFields.
    	Fields() fieldpath.ManagedFields
    
    	// Times gets the timestamps associated with each operation.
    	Times() map[string]*metav1.Time
    }
    
    type managedStruct struct {
    	fields fieldpath.ManagedFields
    	times  map[string]*metav1.Time
    }
    
    var _ ManagedInterface = &managedStruct{}
    
    // Fields implements ManagedInterface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go

    limitations under the License.
    */
    
    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
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 13 22:15:37 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/filterlatency/filterlatency_test.go

    		filterCompletedAtGot time.Time
    	)
    	handler := http.HandlerFunc(func(_ http.ResponseWriter, req *http.Request) {
    		// we expect the handler to be invoked just once.
    		handlerCallCount++
    	})
    
    	requestFilterEndedAt := time.Now()
    	wrapped := trackCompleted(handler, testingclock.NewFakeClock(requestFilterEndedAt), func(_ context.Context, fr *requestFilterRecord, completedAt time.Time) {
    		actionCallCount++
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:57:37 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/atmostevery_test.go

    */
    
    package internal_test
    
    import (
    	"testing"
    	"time"
    
    	"k8s.io/apimachinery/pkg/util/managedfields/internal"
    )
    
    func TestAtMostEvery(t *testing.T) {
    	duration := time.Second
    	delay := 179 * time.Millisecond
    	atMostEvery := internal.NewAtMostEvery(delay)
    	count := 0
    	exit := time.NewTicker(duration)
    	tick := time.NewTicker(2 * time.Millisecond)
    	defer exit.Stop()
    	defer tick.Stop()
    
    	done := false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 1.2K bytes
    - Viewed (0)
Back to top