Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for Printf (0.21 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/CancelCall.java

        // 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);
    
        System.out.printf("%.2f Executing call.%n", (System.nanoTime() - startNanos) / 1e9f);
        try (Response response = call.execute()) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.1K bytes
    - Viewed (0)
  2. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

          String originalName = currentThread.getName();
          currentThread.setName("Crawler " + url);
          try {
            fetch(url);
          } catch (IOException e) {
            System.out.printf("XXX: %s %s%n", url, e);
          } finally {
            currentThread.setName(originalName);
          }
        }
      }
    
      public void fetch(HttpUrl url) throws IOException {
        // Skip hosts that we've visited many times.
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  3. samples/slack/src/main/java/okhttp3/slack/SlackClient.java

          sessionFactory.start();
        }
    
        HttpUrl authorizeUrl = sessionFactory.newAuthorizeUrl(scopes, team, session -> {
          initOauthSession(session);
          System.out.printf("session granted: %s\n", session);
        });
    
        System.out.printf("open this URL in a browser: %s\n", authorizeUrl);
      }
    
      /** Set the OAuth session for this client. */
      public synchronized void initOauthSession(OAuthSession session) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

          final AtomicLong nextCallId = new AtomicLong(1L);
    
          @Override public EventListener create(Call call) {
            long callId = nextCallId.getAndIncrement();
            System.out.printf("%04d %s%n", callId, call.request().url());
            return new PrintingEventListener(callId, System.nanoTime());
          }
        };
    
        final long callId;
        final long callStartNanos;
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

          long nowNanos = System.nanoTime();
          if (name.equals("callStart")) {
            callStartNanos = nowNanos;
          }
          long elapsedNanos = nowNanos - callStartNanos;
          System.out.printf("%.3f %s%n", elapsedNanos / 1000000000d, name);
        }
    
        @Override public void callStart(Call call) {
          printEvent("callStart");
        }
    
        @Override public void proxySelectStart(Call call, HttpUrl url) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        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);
        }
      }
    
      //     /**
      //      * Runs all JSR166 unit tests using junit.textui.TestRunner
      //      */
      //     public static void main(String[] args) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        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);
        }
      }
    
      //     /**
      //      * Runs all JSR166 unit tests using junit.textui.TestRunner
      //      */
      //     public static void main(String[] args) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
  8. maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxerTest.java

            System.out.print(paid); // No, this does not print to system.out. It's part of the test
            assertEquals(paid.length(), byteArrayOutputStream.size());
            threadOutputMuxer.associateThreadWithProjectSegment(projectBuildList.get(1));
            System.out.print(in); // No, this does not print to system.out. It's part of the test
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  9. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/source/GenerateDefaultImports.java

            try (PrintWriter writer = new PrintWriter(new FileWriter(getImportsDestFile().getAsFile().get()))) {
                for (String packageName : packages) {
                    writer.print("import ");
                    writer.print(packageName);
                    writer.println(".*");
                }
            }
        }
    Java
    - Registered: Wed Apr 17 11:36:08 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 2.3K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/service/FailureUrlService.java

                t.printStackTrace(pw);
                pw.flush();
                return systemHelper.abbreviateLongText(sw.toString());
            } catch (final IOException e) {
                logger.warn("Failed to print the stack trace {}", t.getMessage(), e);
            }
            return StringUtil.EMPTY;
        }
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
Back to top