Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 194 for DT (3.68 sec)

  1. src/net/http/pprof/pprof_test.go

    // gccgo -c opt will merge them.
    func mutexHog2(mu1, mu2 *sync.Mutex, start time.Time, dt time.Duration) {
    	atomic.AddUint32(&Sink, 2)
    	for time.Since(start) < dt {
    		// See comment in mutexHog.
    		t1 := time.Now()
    		for time.Since(start) < dt && time.Since(t1) < 10*time.Millisecond {
    			mu1.Lock()
    			mu2.Lock()
    			mu1.Unlock()
    			mu2.Unlock()
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:52:28 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  2. src/cmd/dist/supported_test.go

    	}
    
    	for _, a := range okgoarch {
    		goarch = a
    		for _, o := range okgoos {
    			if _, ok := cgoEnabled[o+"/"+a]; !ok {
    				continue
    			}
    			goos = o
    			for _, mode := range modes {
    				var dt tester
    				dist := dt.supportedBuildmode(mode)
    				std := platform.BuildModeSupported("gc", mode, o, a)
    				if dist != std {
    					t.Errorf("discrepancy for %s-%s %s: dist says %t, standard library says %t", o, a, mode, dist, std)
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. src/time/genzabbrs.go

    			// to avoid dups. I don't know why.
    			continue
    		}
    		l, err := time.LoadLocation(z.Type)
    		if err != nil {
    			return nil, err
    		}
    		st, dt := getAbbrs(l)
    		zs = append(zs, &zone{
    			WinName:  z.Other,
    			UnixName: z.Type,
    			StTime:   st,
    			DSTime:   dt,
    		})
    	}
    	return zs, nil
    }
    
    func main() {
    	flag.Parse()
    	zs, err := readWindowsZones()
    	if err != nil {
    		log.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. src/flag/example_test.go

    	// That would permit usages such as
    	//	-deltaT 10s -deltaT 15s
    	// and other combinations.
    	if len(*i) > 0 {
    		return errors.New("interval flag already set")
    	}
    	for _, dt := range strings.Split(value, ",") {
    		duration, err := time.ParseDuration(dt)
    		if err != nil {
    			return err
    		}
    		*i = append(*i, duration)
    	}
    	return nil
    }
    
    // Define a flag to accumulate durations. Because it has a special type,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 18:59:00 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/switch.go

    				// TODO: why isn't this OTYPE to begin with?
    				dt := n1.(*ir.DynamicType)
    				if dt.RType != nil && dt.RType.Op() == ir.OADDR {
    					addr := dt.RType.(*ir.AddrExpr)
    					if addr.X.Op() == ir.OLINKSYMOFFSET {
    						n1 = ir.TypeNode(n1.Type())
    					}
    				}
    				if dt.ITab != nil && dt.ITab.Op() == ir.OADDR {
    					addr := dt.ITab.(*ir.AddrExpr)
    					if addr.X.Op() == ir.OLINKSYMOFFSET {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  6. src/go/doc/testdata/example.go

    				os.Exit(1)
    			}
    			outC <- buf.String()
    		}()
    
    		// run example
    		t0 := time.Now()
    		eg.F()
    		dt := time.Since(t0)
    
    		// close pipe, restore stdout/stderr, get output
    		w.Close()
    		os.Stdout, os.Stderr = stdout, stderr
    		out := <-outC
    
    		// report any errors
    		tstr := fmt.Sprintf("(%.2f seconds)", dt.Seconds())
    		if g, e := strings.TrimSpace(out), strings.TrimSpace(eg.Output); g != e {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  7. pkg/queue/metrics_test.go

    	q := newQueueMetrics("test")
    	for n := 0; n < b.N; n++ {
    		q.depth.Record(100)
    	}
    }
    
    func BenchmarkMetricsQueueSinceInSeconds(b *testing.B) {
    	q := newQueueMetrics("test")
    	dt := time.Now()
    	for n := 0; n < b.N; n++ {
    		q.sinceInSeconds(dt)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jul 21 16:30:36 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. src/internal/trace/testdata/tests/go122-fail-first-gen-first.test

    -- expect --
    FAILURE "expected a proc but didn't have one"
    -- trace --
    Trace Go1.22
    EventBatch gen=1 m=0 time=0 size=5
    Frequency freq=15625000
    EventBatch gen=1 m=0 time=0 size=5
    GoCreate dt=0 new_g=1 new_stack=0 stack=0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 256 bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/eventclock/real_event_clock_test.go

    		t.Errorf("Got only %v events", numDone)
    	}
    	lastTime := now
    	for i := 0; i <= batchSize; i++ {
    		nextTime := <-times
    		if nextTime.Before(now) {
    			continue
    		}
    		dt := nextTime.Sub(lastTime) / (50 * time.Millisecond)
    		if dt < 0 {
    			t.Errorf("Got %s after %s", nextTime, lastTime)
    		}
    		lastTime = nextTime
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 07 04:07:31 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  10. tests/test_jsonable_encoder.py

        from pydantic import field_serializer
    
        class ModelWithCustomEncoder(BaseModel):
            dt_field: datetime
    
            @field_serializer("dt_field")
            def serialize_dt_field(self, dt):
                return dt.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
    
        class ModelWithCustomEncoderSubclass(ModelWithCustomEncoder):
            pass
    
        model = ModelWithCustomEncoder(dt_field=datetime(2019, 1, 1, 8))
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 9K bytes
    - Viewed (0)
Back to top