Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 190 for nanotime (0.13 sec)

  1. android/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java

        }
        return total;
      }
    
      @Benchmark
      long manual(int reps) {
        long total = 0;
        for (int i = 0; i < reps; i++) {
          long start = System.nanoTime();
          // here is where you would do something
          total += (System.nanoTime() - start);
        }
        return total;
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 1.5K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

      @SuppressWarnings("removal") // b/260137033
      public static void awaitDone(Future<?> future) {
        if (future.isDone()) {
          return;
        }
        long timeoutSeconds = timeoutSeconds();
        long deadline = System.nanoTime() + SECONDS.toNanos(timeoutSeconds);
        do {
          System.runFinalization();
          if (future.isDone()) {
            return;
          }
          System.gc();
          try {
            future.get(1L, SECONDS);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. src/runtime/os_linux_mipsx.go

    //go:build linux && (mips || mipsle)
    
    package runtime
    
    func archauxv(tag, val uintptr) {
    }
    
    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        = 128 + 1
    	_SIG_BLOCK   = 1
    	_SIG_UNBLOCK = 2
    	_SIG_SETMASK = 3
    )
    
    type sigset [4]uint32
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 987 bytes
    - Viewed (0)
  4. src/runtime/os_linux_arm64.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()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 478 bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java

        @Override public Response intercept(Chain chain) throws IOException {
          long t1 = System.nanoTime();
          Request request = chain.request();
          logger.info(String.format("Sending request %s on %s%n%s",
              request.url(), chain.connection(), request.headers()));
          Response response = chain.proceed(request);
    
          long t2 = System.nanoTime();
          logger.info(String.format("Received response for %s in %.1fms%n%s",
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Fri Jan 01 15:55:32 UTC 2016
    - 2K bytes
    - Viewed (0)
  6. src/runtime/lock_js.go

    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    	if gp == gp.m.g0 {
    		throw("notetsleepg on g0")
    	}
    
    	if ns >= 0 {
    		deadline := nanotime() + ns
    		delay := ns/1000000 + 1 // round up
    		if delay > 1<<31-1 {
    			delay = 1<<31 - 1 // cap to max int32
    		}
    
    		id := scheduleTimeoutEvent(delay)
    		mp := acquirem()
    		notes[n] = gp
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  7. maven-model-builder/src/test/java/org/apache/maven/model/building/GraphTest.java

            }
            Collections.shuffle(data);
    
            long t0 = System.nanoTime();
            Graph g = new Graph();
            data.parallelStream().forEach(s -> {
                try {
                    g.addEdge(s[0], s[1]);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            });
            long t1 = System.nanoTime();
        }
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Mon Jan 15 16:49:26 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

      }
    
      @Test fun test() {
        val t1 = System.nanoTime() / 1e6
    
        val delays = mutableListOf(TimeUnit.MILLISECONDS.toNanos(1000), -1L)
        queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(750)) {
          log.put("runOnce delays.size=${delays.size}")
          return@schedule delays.removeAt(0)
        }
    
        assertThat(log.take()).isEqualTo("runOnce delays.size=2")
        val t2 = System.nanoTime() / 1e6 - t1
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt

      if (loggingEnabled) {
        startNs = queue.taskRunner.backend.nanoTime()
        log(task, queue, "starting")
      }
    
      var completedNormally = false
      try {
        val result = block()
        completedNormally = true
        return result
      } finally {
        if (loggingEnabled) {
          val elapsedNs = queue.taskRunner.backend.nanoTime() - startNs
          if (completedNormally) {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  10. platforms/ide/tooling-api/src/testFixtures/groovy/org/gradle/integtests/tooling/fixture/ContinuousBuildToolingApiSpecification.groovy

                        |    } catch (Throwable t) {
                        |    }
                        |}
    
                        |def startAt = System.nanoTime()
                        |gradle.buildFinished {
                        |    long sinceStart = (System.nanoTime() - startAt) / 1000000L
                        |    if (sinceStart > 0 && sinceStart < 2000) {
                        |      sleep(2000 - sinceStart)
                        |    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 9.1K bytes
    - Viewed (0)
Back to top