Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 159 for nanotime (0.24 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. 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)
  8. 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)
  9. src/runtime/os_linux_mips64x.go

    func archauxv(tag, val uintptr) {
    	switch tag {
    	case _AT_HWCAP:
    		cpu.HWCap = uint(val)
    	}
    }
    
    func osArchInit() {}
    
    //go:nosplit
    func cputicks() int64 {
    	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    	return nanotime()
    }
    
    const (
    	_SS_DISABLE  = 2
    	_NSIG        = 129
    	_SIG_BLOCK   = 1
    	_SIG_UNBLOCK = 2
    	_SIG_SETMASK = 3
    )
    
    type sigset [2]uint64
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 996 bytes
    - Viewed (0)
  10. 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)
Back to top