Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 62 for Microseconds (0.18 sec)

  1. src/cmd/cgo/internal/testsanitizers/testdata/tsan7.go

    import "C"
    
    import (
    	"fmt"
    	"os"
    	"sync"
    	"time"
    )
    
    func main() {
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	f := func() {
    		defer wg.Done()
    		for i := 0; i < 100; i++ {
    			time.Sleep(time.Microsecond)
    			mu.Lock()
    			s := fmt.Sprint(i)
    			os.Setenv("TSAN_TEST"+s, s)
    			mu.Unlock()
    		}
    	}
    	wg.Add(2)
    	go f()
    	go f()
    	wg.Wait()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 708 bytes
    - Viewed (0)
  2. src/syscall/timestruct.go

    func TimevalToNsec(tv Timeval) int64 { return tv.Nano() }
    
    // NsecToTimeval converts a number of nanoseconds into a [Timeval].
    func NsecToTimeval(nsec int64) Timeval {
    	nsec += 999 // round up to microsecond
    	usec := nsec % 1e9 / 1e3
    	sec := nsec / 1e9
    	if usec < 0 {
    		usec += 1e6
    		sec--
    	}
    	return setTimeval(sec, usec)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 958 bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/plugin/pkg/audit/log/backend_test.go

    			SourceIPs: []string{
    				"127.0.0.1",
    			},
    			RequestReceivedTimestamp: metav1.NewMicroTime(time.Now().Truncate(time.Microsecond)),
    			StageTimestamp:           metav1.NewMicroTime(time.Now().Truncate(time.Microsecond)),
    			AuditID:                  types.UID(uuid.New().String()),
    			Stage:                    auditinternal.StageRequestReceived,
    			Verb:                     "get",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 08 06:37:26 UTC 2022
    - 5K bytes
    - Viewed (0)
  4. pkg/wasm/httpfetcher_test.go

    				c.handler(w, r, gotNumRequest)
    				gotNumRequest++
    			}))
    			defer ts.Close()
    			fetcher := NewHTTPFetcher(DefaultHTTPRequestTimeout, DefaultHTTPRequestMaxRetries)
    			fetcher.initialBackoff = time.Microsecond
    			ctx, cancel := context.WithTimeout(context.Background(), c.timeout)
    			defer cancel()
    			b, err := fetcher.Fetch(ctx, ts.URL, false)
    			if c.wantNumRequest != gotNumRequest {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:41 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  5. src/cmd/trace/viewer.go

    		return traceviewer.GRunning
    	default:
    		panic(fmt.Sprintf("unknown GoState: %s", state.String()))
    	}
    }
    
    func viewerTime(t time.Duration) float64 {
    	return float64(t) / float64(time.Microsecond)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  6. internal/s3select/parquet/reader.go

    						duration = time.Duration(val) * time.Nanosecond
    					case ts.Unit.IsSetMILLIS():
    						duration = time.Duration(val) * time.Millisecond
    					case ts.Unit.IsSetMICROS():
    						duration = time.Duration(val) * time.Microsecond
    					default:
    						return nil, errors.New("Invalid LogicalType annotation found")
    					}
    					value = sql.FormatSQLTimestamp(time.Unix(0, 0).Add(duration))
    				}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 14 13:54:47 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  7. src/runtime/testdata/testprognet/signalexec.go

    	c := make(chan os.Signal, tries)
    	signal.Notify(c, syscall.SIGWINCH)
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		for range c {
    		}
    	}()
    
    	for i := 0; i < tries; i++ {
    		time.Sleep(time.Microsecond)
    		wg.Add(2)
    		go func() {
    			defer wg.Done()
    			cmd := exec.Command(os.Args[0], "Nop")
    			cmd.Stdout = os.Stdout
    			cmd.Stderr = os.Stderr
    			if err := cmd.Run(); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  8. test/fixedbugs/issue11256.go

    			runtime.Goexit()
    		}()
    
    		// Generate some garbage.
    		x[i] = make([]byte, 1024*1024)
    
    		// Give GC some time to install stack barriers in the G.
    		time.Sleep(50 * time.Microsecond)
    		atomic.StoreInt32(&done, 1)
    		for atomic.LoadInt32(&done) == 1 {
    			runtime.Gosched()
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 29 15:02:30 UTC 2015
    - 1.1K bytes
    - Viewed (0)
  9. src/os/exec/exec_linux_test.go

    	// In particular this should be more than the number of threads
    	// the garbage collector might create.
    	const threads = 10
    
    	var wg sync.WaitGroup
    	wg.Add(threads)
    	ts := syscall.NsecToTimespec((100 * time.Microsecond).Nanoseconds())
    	for i := 0; i < threads; i++ {
    		go func() {
    			defer wg.Done()
    			syscall.Nanosleep(&ts, nil)
    		}()
    	}
    	wg.Wait()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 26 14:49:07 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  10. pkg/kube/controllers/queue_test.go

    		handles.Inc()
    		return nil
    	}))
    	q.Add(types.NamespacedName{Name: "something"})
    	stop := make(chan struct{})
    	go q.Run(stop)
    	retry.UntilOrFail(t, q.HasSynced, retry.Delay(time.Microsecond))
    	assert.Equal(t, handles.Load(), 1)
    	q.Add(types.NamespacedName{Name: "something else"})
    	close(stop)
    	assert.NoError(t, q.WaitForClose(time.Second))
    	// event 2 is guaranteed to happen from WaitForClose
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 15 16:18:19 UTC 2023
    - 1.3K bytes
    - Viewed (0)
Back to top