Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 63 for nanotime (2.9 sec)

  1. src/runtime/os_wasm.go

    	sec, nsec, _ = time_now()
    	return
    }
    
    //go:nosplit
    func cputicks() int64 {
    	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    	return nanotime()
    }
    
    // gsignalStack is unused on js.
    type gsignalStack struct{}
    
    const preemptMSupported = false
    
    func preemptM(mp *m) {
    	// No threads, so nothing to do.
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

            if (routePlanner.isCanceled()) throw IOException("Canceled")
    
            // Launch a new connection if we're ready to.
            val now = taskRunner.backend.nanoTime()
            var awaitTimeoutNanos = nextTcpConnectAtNanos - now
            var connectResult: ConnectResult? = null
            if (tcpConnectsInFlight.isEmpty() || awaitTimeoutNanos <= 0) {
              connectResult = launchTcpConnect()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. src/runtime/cpuprof.go

    			unlock(&cpuprof.lock)
    			return
    		}
    
    		cpuprof.on = true
    		cpuprof.log = newProfBuf(1, profBufWordCount, profBufTagCount)
    		hdr := [1]uint64{uint64(hz)}
    		cpuprof.log.write(nil, nanotime(), hdr[:], nil)
    		setcpuprofilerate(int32(hz))
    	} else if cpuprof.on {
    		setcpuprofilerate(0)
    		cpuprof.on = false
    		cpuprof.addExtra()
    		cpuprof.log.close()
    	}
    	unlock(&cpuprof.lock)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. src/internal/poll/fd_poll_runtime.go

    import (
    	"errors"
    	"sync"
    	"syscall"
    	"time"
    	_ "unsafe" // for go:linkname
    )
    
    // runtimeNano returns the current value of the runtime clock in nanoseconds.
    //
    //go:linkname runtimeNano runtime.nanotime
    func runtimeNano() int64
    
    func runtime_pollServerInit()
    func runtime_pollOpen(fd uintptr) (uintptr, int)
    func runtime_pollClose(ctx uintptr)
    func runtime_pollWait(ctx uintptr, mode int) int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:59 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. src/runtime/debugcall.go

    	// No user calls from the system stack.
    	if getg() != getg().m.curg {
    		return debugCallSystemStack
    	}
    	if sp := getcallersp(); !(getg().stack.lo < sp && sp <= getg().stack.hi) {
    		// Fast syscalls (nanotime) and racecall switch to the
    		// g0 stack without switching g. We can't safely make
    		// a call in this state. (We can't even safely
    		// systemstack.)
    		return debugCallSystemStack
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 20:50:21 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  6. src/runtime/os_openbsd.go

    //go:nosplit
    func semacreate(mp *m) {
    }
    
    //go:nosplit
    func semasleep(ns int64) int32 {
    	gp := getg()
    
    	// Compute sleep deadline.
    	var tsp *timespec
    	if ns >= 0 {
    		var ts timespec
    		ts.setNsec(ns + nanotime())
    		tsp = &ts
    	}
    
    	for {
    		v := atomic.Load(&gp.m.waitsemacount)
    		if v > 0 {
    			if atomic.Cas(&gp.m.waitsemacount, v, v-1) {
    				return 0 // semaphore acquired
    			}
    			continue
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. src/runtime/rand.go

    func readTimeRandom(r []byte) {
    	// Inspired by wyrand.
    	// An earlier version of this code used getg().m.procid as well,
    	// but note that this is called so early in startup that procid
    	// is not initialized yet.
    	v := uint64(nanotime())
    	for len(r) > 0 {
    		v ^= 0xa0761d6478bd642f
    		v *= 0xe7037ed1a0b428db
    		size := 8
    		if len(r) < 8 {
    			size = len(r)
    		}
    		for i := 0; i < size; i++ {
    			r[i] ^= byte(v >> (8 * i))
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. src/runtime/vdso_freebsd.go

    	case _CLOCK_REALTIME:
    		abs = true
    	default:
    		return zeroBintime
    	}
    	return binuptime(abs)
    }
    
    func fallback_nanotime() int64
    func fallback_walltime() (sec int64, nsec int32)
    
    //go:nosplit
    func nanotime1() int64 {
    	bt := vdsoClockGettime(_CLOCK_MONOTONIC)
    	if bt == zeroBintime {
    		return fallback_nanotime()
    	}
    	return int64((1e9 * uint64(bt.sec)) + ((1e9 * uint64(bt.frac>>32)) >> 32))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. src/runtime/os_openbsd_syscall2.go

    func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
    
    // munmap calls the munmap system call. It is implemented in assembly.
    func munmap(addr unsafe.Pointer, n uintptr)
    
    func nanotime1() int64
    
    //go:noescape
    func sigaltstack(new, old *stackt)
    
    func fcntl(fd, cmd, arg int32) (ret int32, errno int32)
    
    func walltime() (sec int64, nsec int32)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  10. src/runtime/os_wasip1.go

    	var time timestamp
    	if clock_time_get(clockRealtime, 0, unsafe.Pointer(&time)) != 0 {
    		throw("clock_time_get failed")
    	}
    	return int64(time / 1000000000), int32(time % 1000000000)
    }
    
    func nanotime1() int64 {
    	var time timestamp
    	if clock_time_get(clockMonotonic, 0, unsafe.Pointer(&time)) != 0 {
    		throw("clock_time_get failed")
    	}
    	return int64(time)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 7K bytes
    - Viewed (0)
Back to top