Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 128 for nanotime (0.13 sec)

  1. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        if (profileTests) runTestProfiled();
        else super.runTest();
      }
    
      protected void runTestProfiled() throws Throwable {
        long t0 = System.nanoTime();
        try {
          super.runTest();
        } finally {
          long elapsedMillis = (System.nanoTime() - t0) / (1000L * 1000L);
          if (elapsedMillis >= profileThreshold)
            System.out.printf("%n%s: %d%n", toString(), elapsedMillis);
        }
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        )
        val startNanos = System.nanoTime()
        val connection = server.url("/").toUrl().openConnection()
        connection.setDoOutput(true)
        connection.getOutputStream().write("ABCDEF".toByteArray(StandardCharsets.UTF_8))
        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo(-1)
        val elapsedNanos = System.nanoTime() - startNanos
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  3. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

            .build(),
        )
        val startNanos = System.nanoTime()
        val connection = server.url("/").toUrl().openConnection()
        connection.doOutput = true
        connection.getOutputStream().write("ABCDEF".toByteArray(UTF_8))
        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo(-1)
        val elapsedNanos = System.nanoTime() - startNanos
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

    ) : EventListener(),
      EventListener.Factory {
      private var startNs: Long? = null
    
      override fun create(call: Call): EventListener = this
    
      override fun callStart(call: Call) {
        startNs = System.nanoTime()
    
        logWithTime("callStart: ${call.request()}")
    
        delegate.callStart(call)
      }
    
      override fun proxySelectStart(
        call: Call,
        url: HttpUrl,
      ) {
        logWithTime("proxySelectStart: $url")
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        peer.sendFrame().ping(true, Http2Connection.AWAIT_PING, 5)
        peer.play()
    
        // Play it back.
        val connection = connect(peer)
        val pingAtNanos = System.nanoTime()
        connection.writePingAndAwaitPong()
        val elapsedNanos = System.nanoTime() - pingAtNanos
        assertThat(elapsedNanos).isGreaterThan(0L)
        assertThat(elapsedNanos).isLessThan(TimeUnit.SECONDS.toNanos(1))
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 75.4K bytes
    - Viewed (0)
  6. src/runtime/preempt.go

    		// best-effort) and then sleep until we're notified
    		// that the goroutine is suspended.
    		if i == 0 {
    			nextYield = nanotime() + yieldDelay
    		}
    		if nanotime() < nextYield {
    			procyield(10)
    		} else {
    			osyield()
    			nextYield = nanotime() + yieldDelay/2
    		}
    	}
    }
    
    // resumeG undoes the effects of suspendG, allowing the suspended
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  7. 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)
  8. src/runtime/lock_sema.go

    			const ns = 10e6
    			for semasleep(ns) < 0 {
    				asmcgocall(*cgo_yield, nil)
    			}
    		}
    		gp.m.blocked = false
    		return true
    	}
    
    	deadline = nanotime() + ns
    	for {
    		// Registered. Sleep.
    		gp.m.blocked = true
    		if *cgo_yield != nil && ns > 10e6 {
    			ns = 10e6
    		}
    		if semasleep(ns) >= 0 {
    			gp.m.blocked = false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  9. platforms/core-runtime/files/src/main/java/org/gradle/internal/file/locking/ExclusiveFileAccessManager.java

                }
            } finally {
                maybeCloseQuietly(channel);
                maybeCloseQuietly(randomAccessFile);
            }
        }
    
        private long getTimeMillis() {
            return System.nanoTime() / (1000L * 1000L);
        }
    
        private static void maybeCloseQuietly(Closeable closeable) {
            if (closeable != null) {
                try {
                    closeable.close();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 10 15:52:53 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

      internal fun scheduleAndDecide(
        task: Task,
        delayNanos: Long,
        recurrence: Boolean,
      ): Boolean {
        task.initQueue(this)
    
        val now = taskRunner.backend.nanoTime()
        val executeNanoTime = now + delayNanos
    
        // If the task is already scheduled, take the earlier of the two times.
        val existingIndex = futureTasks.indexOf(task)
        if (existingIndex != -1) {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.5K bytes
    - Viewed (0)
Back to top