time_util_base.cc 465 B

1234567891011121314151617
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "rlz/lib/time_util.h"
  5. #include "base/time/time.h"
  6. namespace rlz_lib {
  7. int64_t GetSystemTimeAsInt64() {
  8. // Seconds since epoch (Jan 1, 1970).
  9. double now_seconds = base::Time::Now().ToDoubleT();
  10. return static_cast<int64_t>(now_seconds * 1000 * 1000 * 10);
  11. }
  12. } // namespace rlz_lib