Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 106 for timers (5.46 sec)

  1. src/cmd/go/internal/lockedfile/lockedfile_test.go

    	t.Helper()
    
    	done := make(chan struct{})
    	go func() {
    		f()
    		close(done)
    	}()
    
    	timer := time.NewTimer(quiescent)
    	defer timer.Stop()
    	select {
    	case <-done:
    		t.Fatalf("%s unexpectedly did not block", desc)
    	case <-timer.C:
    	}
    
    	return func(t *testing.T) {
    		logTimer := time.NewTimer(quiescent)
    		defer logTimer.Stop()
    
    		select {
    		case <-logTimer.C:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/flags/flags.go

    	I        MultiFlag
    	PrintOut int
    	DebugV   bool
    )
    
    func init() {
    	flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifier=value; can be set multiple times")
    	flag.Var(&I, "I", "include directory; can be set multiple times")
    	flag.BoolVar(&DebugV, "v", false, "print debug output")
    	flag.Var(objabi.NewDebugFlag(&DebugFlags, nil), "d", "enable debugging settings; try -d help")
    	objabi.AddVersionFlag() // -V
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:18:23 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testcarchive/carchive_test.go

    	sb := new(strings.Builder)
    	cmd.Stdout = sb
    	cmd.Stderr = sb
    	if err := cmd.Start(); err != nil {
    		t.Fatal(err)
    	}
    
    	timer := time.AfterFunc(time.Minute,
    		func() {
    			t.Error("test program timed out")
    			cmd.Process.Kill()
    		},
    	)
    	defer timer.Stop()
    
    	err = cmd.Wait()
    	t.Logf("%v\n%s", cmd.Args, sb)
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    // Issue 49288.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:43:51 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/resolver_test.go

    	// We need the foundUses/Defs maps (rather than just deleting the found objects
    	// from the uses and defs maps) because syntax.Walk traverses shared nodes multiple
    	// times (e.g. types in field lists such as "a, b, c int").
    	foundUses := make(map[*syntax.Name]bool)
    	foundDefs := make(map[*syntax.Name]bool)
    	var both []string
    	for _, f := range files {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:59:20 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. src/cmd/go/internal/cache/cache_test.go

    		t.Fatal(err)
    	}
    	defer os.RemoveAll(dir)
    
    	c, err := Open(dir)
    	if err != nil {
    		t.Fatalf("Open: %v", err)
    	}
    	const start = 1000000000
    	now := int64(start)
    	c.now = func() time.Time { return time.Unix(now, 0) }
    
    	checkTime := func(name string, mtime int64) {
    		t.Helper()
    		file := filepath.Join(c.dir, name[:2], name)
    		info, err := os.Stat(file)
    		if err != nil {
    			t.Fatal(err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:49:37 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  6. src/cmd/go/internal/cache/cache.go

    // within 5 days of the previous reuse. See golang.org/issue/22990.
    const (
    	mtimeInterval = 1 * time.Hour
    	trimInterval  = 24 * time.Hour
    	trimLimit     = 5 * 24 * time.Hour
    )
    
    // used makes a best-effort attempt to update mtime on file,
    // so that mtime reflects cache access time.
    //
    // Because the reflection only needs to be approximate,
    // and to reduce the amount of disk activity caused by using
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 14:19:39 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/fmt.go

    var BlankSym *Sym
    
    // numImport tracks how often a package with a given name is imported.
    // It is used to provide a better error message (by using the package
    // path to disambiguate) if a package that appears multiple times with
    // the same name appears in an error message.
    var NumImport = make(map[string]int)
    
    // fmtMode represents the kind of printing being done.
    // The default is regular Go syntax (fmtGo).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/staticinit/sched.go

    				if !safeLHS(lhs) {
    					return true
    				}
    			}
    		}
    
    		return false
    	})
    }
    
    // canRepeat reports whether executing n multiple times has the same effect as
    // assigning n to a single variable and using that variable multiple times.
    func canRepeat(n ir.Node) bool {
    	bad := func(n ir.Node) bool {
    		if isSideEffect(n) {
    			return true
    		}
    		switch n.Op() {
    		case ir.OMAKECHAN,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  9. src/cmd/go/internal/test/test.go

    	    Run enough iterations of each benchmark to take t, specified
    	    as a time.Duration (for example, -benchtime 1h30s).
    	    The default is 1 second (1s).
    	    The special syntax Nx means to run the benchmark N times
    	    (for example, -benchtime 100x).
    
    	-count n
    	    Run each test, benchmark, and fuzz seed n times (default 1).
    	    If -cpu is set, run n times for each GOMAXPROCS value.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/magic.go

    // Then
    //   ⎣x / c⎦ = ⎣x * m / 2^(n+s)⎦
    // If x is negative we have
    //   ⎡x / c⎤ = ⎣x * m / 2^(n+s)⎦ + 1
    // (TODO: derivation?)
    //
    // The multiply is a bit odd, as it is a signed n-bit value
    // times an unsigned n-bit value.  For n smaller than the
    // word size, we can extend x and m appropriately and use the
    // signed multiply instruction.  For n == word size,
    // we must use the signed multiply high and correct
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:25 UTC 2024
    - 15.8K bytes
    - Viewed (0)
Back to top