build_time.h 949 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 2011 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. #ifndef BASE_BUILD_TIME_H_
  5. #define BASE_BUILD_TIME_H_
  6. #include "base/base_export.h"
  7. #include "base/time/time.h"
  8. namespace base {
  9. // GetBuildTime returns the time at which the current binary was built,
  10. // rounded down to 5:00:00am at the start of the day in UTC.
  11. //
  12. // This uses a generated file, which doesn't trigger a rebuild when the time
  13. // changes. It will, however, be updated whenever //build/util/LASTCHANGE
  14. // changes.
  15. //
  16. // This value should only be considered accurate to within a day.
  17. // It will always be in the past.
  18. //
  19. // Note: If the build is not official (i.e. is_official_build = false)
  20. // this time will be set to 5:00:00am on the most recent first Sunday
  21. // of a month.
  22. Time BASE_EXPORT GetBuildTime();
  23. } // namespace base
  24. #endif // BASE_BUILD_TIME_H_