Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 190 for nanotime (0.11 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

      override fun requestHeadersStart(call: Call) = logEvent(RequestHeadersStart(System.nanoTime(), call))
    
      override fun requestHeadersEnd(
        call: Call,
        request: Request,
      ) = logEvent(RequestHeadersEnd(System.nanoTime(), call, request.headers.byteCount()))
    
      override fun requestBodyStart(call: Call) = logEvent(RequestBodyStart(System.nanoTime(), call))
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9K bytes
    - Viewed (0)
  2. src/runtime/time_nofake.go

    // Exported via linkname for use by time and internal/poll.
    //
    // Many external packages also linkname nanotime for a fast monotonic time.
    // Such code should be updated to use:
    //
    //	var start = time.Now() // at init time
    //
    // and then replace nanotime() with time.Since(start), which is equally fast.
    //
    // However, all the code linknaming nanotime is never going to go away.
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/Uninterruptibles.java

          long end = System.nanoTime() + remainingNanos;
    
          while (true) {
            try {
              // CountDownLatch treats negative timeouts just like zero.
              return latch.await(remainingNanos, NANOSECONDS);
            } catch (InterruptedException e) {
              interrupted = true;
              remainingNanos = end - System.nanoTime();
            }
          }
        } finally {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

          unit: TimeUnit,
        ): T? {
          taskRunner.lock.withLock {
            val waitUntil = nanoTime + unit.toNanos(timeout)
            while (true) {
              val result = poll()
              if (result != null) return result
              if (nanoTime >= waitUntil) return null
              val editCountBefore = editCount
              yieldUntil { nanoTime >= waitUntil || editCount > editCountBefore }
            }
          }
        }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt

            .build()
    
        val startNanos = System.nanoTime()
        val call = client.newCall(request)
    
        // Schedule a job to cancel the call in 1 second.
        executor.schedule({
          System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f)
          call.cancel()
          System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f)
        }, 1, TimeUnit.SECONDS)
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/TimeSource.java

    interface TimeSource {
    
        long currentTimeMillis();
    
        long nanoTime();
    
        TimeSource SYSTEM = new TimeSource() {
            @Override
            public long currentTimeMillis() {
                return System.currentTimeMillis();
            }
    
            @Override
            public long nanoTime() {
                return System.nanoTime();
            }
        };
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 999 bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

          long end = System.nanoTime() + remainingNanos;
    
          while (true) {
            try {
              // CountDownLatch treats negative timeouts just like zero.
              return latch.await(remainingNanos, NANOSECONDS);
            } catch (InterruptedException e) {
              interrupted = true;
              remainingNanos = end - System.nanoTime();
            }
          }
        } finally {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 14.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

        redQueue.execute("task one", 100.µs) {
          log += "one:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}"
        }
    
        redQueue.execute("task two", 100.µs) {
          log += "two:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}"
        }
    
        redQueue.execute("task three", 100.µs) {
          log += "three:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}"
        }
    
        taskFaker.advanceUntil(0.µs)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 23K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/CancelCall.java

            .build();
    
        final long startNanos = System.nanoTime();
        final Call call = client.newCall(request);
    
        // Schedule a job to cancel the call in 1 second.
        executor.schedule(() -> {
          System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f);
          call.cancel();
          System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f);
        }, 1, TimeUnit.SECONDS);
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  10. src/runtime/os_freebsd_arm64.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime
    
    //go:nosplit
    func cputicks() int64 {
    	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    	return nanotime()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 320 bytes
    - Viewed (0)
Back to top