- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 81 for nanotime (0.21 sec)
-
guava/src/com/google/common/collect/Queues.java
Preconditions.checkNotNull(buffer); /* * This code performs one System.nanoTime() more than necessary, and in return, the time to * execute Queue#drainTo is not added *on top* of waiting for the timeout (which could make * the timeout arbitrarily inaccurate, given a queue that is slow to drain). */ long deadline = System.nanoTime() + unit.toNanos(timeout); int added = 0; while (added < numElements) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 18K bytes - Viewed (0) -
src/runtime/metrics_test.go
} mu := &mus[n] runtime.Lock(mu) for int(needContention.Load()) == n { if runtime.MutexContended(mu) { // make them wait a little while for start := runtime.Nanotime(); (runtime.Nanotime()-start)/1000 < delayMicros; { runtime.Usleep(uint32(delayMicros)) } break } } runtime.Unlock(mu) needContention.Store(int64(n - 1)) return true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 45K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
} } private fun ensureAllTaskQueuesIdle() { val entryTime = System.nanoTime() for (queue in TaskRunner.INSTANCE.activeQueues()) { // We wait at most 1 second, so we don't ever turn multiple lost threads into // a test timeout failure. val waitTime = (entryTime + 1_000_000_000L - System.nanoTime()) if (!queue.idleLatch().await(waitTime, TimeUnit.NANOSECONDS)) {
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Monitor.java
* - System.nanoTime() is expensive enough that we want to call it the minimum required number of * times, typically once before invoking a blocking method. This often requires keeping track of * the first time in a method that nanoTime() has been invoked, for which the special value 0L * is reserved to mean "uninitialized". If timeout is non-positive, then nanoTime need never be * called.
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 18:22:01 UTC 2023 - 38.6K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Monitor.java
* - System.nanoTime() is expensive enough that we want to call it the minimum required number of * times, typically once before invoking a blocking method. This often requires keeping track of * the first time in a method that nanoTime() has been invoked, for which the special value 0L * is reserved to mean "uninitialized". If timeout is non-positive, then nanoTime need never be * called.
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 18:22:01 UTC 2023 - 42.5K bytes - Viewed (0) -
src/runtime/os_netbsd.go
if ns >= 0 { deadline = nanotime() + ns } for { v := atomic.Load(&gp.m.waitsemacount) if v > 0 { if atomic.Cas(&gp.m.waitsemacount, v, v-1) { return 0 // semaphore acquired } continue } // Sleep until unparked by semawakeup or timeout. var tsp *timespec var ts timespec if ns >= 0 { wait := deadline - nanotime() if wait <= 0 { return -1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 10.1K bytes - Viewed (0) -
src/runtime/os_darwin.go
} if err := pthread_cond_init(&mp.cond, nil); err != 0 { throw("pthread_cond_init") } } //go:nosplit func semasleep(ns int64) int32 { var start int64 if ns >= 0 { start = nanotime() } g := getg() mp := g.m if g == mp.gsignal { // sema sleep/wakeup are implemented with pthreads, which are not async-signal-safe on Darwin. throw("semasleep on Darwin signal stack") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 20:34:30 UTC 2023 - 11.9K bytes - Viewed (0) -
src/runtime/time.go
// writes to seq are protected by both t.mu and t.sendLock, // so reads are allowed when holding either of the two mutexes. // // The delay argument is nanotime() - t.when, meaning the delay in ns between // when the timer should have gone off and now. Normally that amount is // small enough not to matter, but for channel timers that are fed lazily,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 14:36:24 UTC 2024 - 37.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
} } internal fun incrementSuccessCount() { this.withLock { successCount++ } } @Throws(IOException::class) fun start() { idleAtNs = System.nanoTime() if (protocol == Protocol.HTTP_2 || protocol == Protocol.H2_PRIOR_KNOWLEDGE) { startHttp2() } } @Throws(IOException::class) private fun startHttp2() { val socket = this.socket!!
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 15.4K bytes - Viewed (0) -
src/runtime/netpoll.go
rseq uintptr // protects from stale read timers rt timer // read deadline timer rd int64 // read deadline (a nanotime in the future, -1 when expired) wseq uintptr // protects from stale write timers wt timer // write deadline timer wd int64 // write deadline (a nanotime in the future, -1 when expired) self *pollDesc // storage for indirect interface. See (*pollDesc).makeArg. }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 20.7K bytes - Viewed (0)