Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NowNanos (0.17 sec)

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

        long callStartNanos;
    
        private void printEvent(String name) {
          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) {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  2. docs/features/events.md

    ```java
    class PrintingEventListener extends EventListener {
      private long callStartNanos;
    
      private void printEvent(String name) {
        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) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  3. tensorflow/c/env.cc

      return list;
    }
    
    char* TF_GetTempFileName(const char* extension) {
      return strdup(::tensorflow::io::GetTempFilename(extension).c_str());
    }
    
    TF_CAPI_EXPORT extern uint64_t TF_NowNanos(void) {
      return ::tensorflow::Env::Default()->NowNanos();
    }
    
    // Returns the number of microseconds since the Unix epoch.
    TF_CAPI_EXPORT extern uint64_t TF_NowMicros(void) {
      return ::tensorflow::Env::Default()->NowMicros();
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
  4. tensorflow/c/env_test.cc

      TF_StringStreamDone(tempdirs);
    }
    
    TEST(TestEnv, TestTimeFunctions) {
      ASSERT_GE(TF_NowSeconds(), 946684800);  // Midnight Jan 1, 2000
      ASSERT_GE(TF_NowMicros(), 946684800 * 1e6);
      ASSERT_GE(TF_NowNanos(), 946684800 * 1e9);
    }
    
    namespace {
    
    struct SomeThreadData {
      ::tensorflow::mutex mu;
      bool did_work = false;
    };
    
    void SomeThreadFunc(void* data) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Dec 10 20:52:48 GMT 2018
    - 4.2K bytes
    - Viewed (0)
  5. tensorflow/c/env.h

    // The caller is responsible for freeing the returned pointer.
    TF_CAPI_EXPORT extern char* TF_GetTempFileName(const char* extension);
    
    // Returns the number of nanoseconds since the Unix epoch.
    TF_CAPI_EXPORT extern uint64_t TF_NowNanos(void);
    
    // Returns the number of microseconds since the Unix epoch.
    TF_CAPI_EXPORT extern uint64_t TF_NowMicros(void);
    
    // Returns the number of seconds since the Unix epoch.
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sat Jan 09 02:53:27 GMT 2021
    - 9.6K bytes
    - Viewed (0)
Back to top