Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 128 for nanotime (0.1 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. 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)
  4. 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)
  5. 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)
  6. 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)
  7. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/MonotonicClock.java

        }
    
        MonotonicClock(TimeSource timeSource, long syncIntervalMillis) {
            long nanoTime = timeSource.nanoTime();
            long currentTimeMillis = timeSource.currentTimeMillis();
    
            this.timeSource = timeSource;
            this.syncIntervalMillis = syncIntervalMillis;
            this.syncNanosRef = new AtomicLong(nanoTime);
            this.syncMillisRef = new AtomicLong(currentTimeMillis);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 5K bytes
    - Viewed (0)
  8. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/WaitAtEndOfBuildFixture.groovy

            if (gradleVersion < SUPPORTS_BUILD_SERVICES) {
                return """
                    def startAt = System.nanoTime()
                    gradle.buildFinished {
                        long sinceStart = (System.nanoTime() - startAt) / 1000000L
                        if (sinceStart > 0 && sinceStart < $minimumBuildTimeMillis) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/DefaultTimer.java

        }
    
        @Override
        public long getElapsedMillis() {
            long elapsedNanos = timeSource.nanoTime() - startTime;
            long elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos);
    
            // System.nanoTime() can go backwards under some circumstances.
            // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6458294
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  10. src/runtime/tracetime.go

    // Trace time and clock.
    
    package runtime
    
    import (
    	"internal/goarch"
    	_ "unsafe"
    )
    
    // Timestamps in trace are produced through either nanotime or cputicks
    // and divided by traceTimeDiv. nanotime is used everywhere except on
    // platforms where osHasLowResClock is true, because the system clock
    // isn't granular enough to get useful information out of a trace in
    // many cases.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top