diff options
author | 2018-07-31 13:04:40 -0700 | |
---|---|---|
committer | 2018-07-31 13:08:58 -0700 | |
commit | 20f56d1057aaacd6f2cc2601793689e00bc9561b (patch) | |
tree | 9bbd37b88532ec7f4a89ecc62149dcd2a7f2e82d /tensorflow/core/platform/cloud/gcs_throttle_test.cc | |
parent | c5fcae3d5c632069a57ef1374e628d25be90e563 (diff) |
Adding `NowNanos()` to `tensorflow::Env`.
PiperOrigin-RevId: 206812942
Diffstat (limited to 'tensorflow/core/platform/cloud/gcs_throttle_test.cc')
-rw-r--r-- | tensorflow/core/platform/cloud/gcs_throttle_test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/core/platform/cloud/gcs_throttle_test.cc b/tensorflow/core/platform/cloud/gcs_throttle_test.cc index 57193ac405..8f962b92b8 100644 --- a/tensorflow/core/platform/cloud/gcs_throttle_test.cc +++ b/tensorflow/core/platform/cloud/gcs_throttle_test.cc @@ -24,14 +24,14 @@ namespace { class TestTime : public EnvTime { public: - uint64 NowMicros() override { return now_; } + uint64 NowNanos() override { return now_micros_ * kMicrosToNanos; } - void SetTime(uint64 now_micros) { now_ = now_micros; } + void SetTime(uint64 now_micros) { now_micros_ = now_micros; } - void AdvanceSeconds(int64 secs) { now_ += secs * 1000000L; } + void AdvanceSeconds(int64 secs) { now_micros_ += secs * kSecondsToMicros; } private: - uint64 now_ = 1234567890000000ULL; + uint64 now_micros_ = 1234567890000000ULL; }; class GcsThrottleTest : public ::testing::Test { |