Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for NowSeconds (0.17 sec)

  1. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      std::unique_ptr<NowSecondsEnv> env(new NowSecondsEnv);
      uint64 now = Env::Default()->NowSeconds();
      env->SetNowSeconds(now);
      tf_gcs_filesystem::RamFileBlockCache cache(
          8, 32, 1 /* max staleness */, fetcher,
          [&env]() { return env->NowSeconds(); });
      // Read three blocks into the cache, and advance the timestamp by one second
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
  2. tensorflow/c/env.cc

    TF_CAPI_EXPORT extern uint64_t TF_NowMicros(void) {
      return ::tensorflow::Env::Default()->NowMicros();
    }
    
    // Returns the number of seconds since the Unix epoch.
    TF_CAPI_EXPORT extern uint64_t TF_NowSeconds(void) {
      return ::tensorflow::Env::Default()->NowSeconds();
    }
    
    void TF_DefaultThreadOptions(TF_ThreadOptions* options) {
      options->stack_size = 0;
      options->guard_size = 0;
      options->numa_node = -1;
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
  3. tensorflow/c/env_test.cc

        TF_DeleteStatus(s);
        break;
      }
    
      ASSERT_TRUE(found) << "expected at least one temp dir";
    
      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;
    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)
  4. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache_test.cc

    namespace {
    
    TEST(ExpiringLRUCacheTest, MaxAge) {
      const string key = "a";
      std::unique_ptr<NowSecondsEnv> env(new NowSecondsEnv);
      tf_gcs_filesystem::ExpiringLRUCache<int> cache(
          1, 0, [&env]() { return env->NowSeconds(); });
      env->SetNowSeconds(1);
      // Verify that replacement of an existing element works, and updates the
      // timestamp of the entry.
      cache.Insert(key, 41);
      env->SetNowSeconds(2);
      cache.Insert(key, 42);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 7.1K bytes
    - Viewed (0)
  5. tensorflow/c/env.h

    // 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.
    TF_CAPI_EXPORT extern uint64_t TF_NowSeconds(void);
    
    // Populates a TF_ThreadOptions struct with system-default values.
    TF_CAPI_EXPORT extern void TF_DefaultThreadOptions(TF_ThreadOptions* options);
    
    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)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache.h

      /// `max_age` is also 0, the cache will not be populated).
      ExpiringLRUCache(uint64_t max_age, size_t max_entries,
                       std::function<uint64_t()> timer_seconds = TF_NowSeconds)
          : max_age_(max_age),
            max_entries_(max_entries),
            timer_seconds_(timer_seconds) {}
    
      /// Insert `value` with key `key`. This will replace any previous entry with
      /// the same key.
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 6.3K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

          BlockFetcher;
    
      RamFileBlockCache(size_t block_size, size_t max_bytes, uint64_t max_staleness,
                        BlockFetcher block_fetcher,
                        std::function<uint64_t()> timer_seconds = TF_NowSeconds)
          : block_size_(block_size),
            max_bytes_(max_bytes),
            max_staleness_(max_staleness),
            block_fetcher_(block_fetcher),
            timer_seconds_(timer_seconds),
            pruning_thread_(nullptr,
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
Back to top