1*635a8641SAndroid Build Coastguard Worker // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2*635a8641SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*635a8641SAndroid Build Coastguard Worker // found in the LICENSE file. 4*635a8641SAndroid Build Coastguard Worker 5*635a8641SAndroid Build Coastguard Worker #ifndef BASE_BUILD_TIME_H_ 6*635a8641SAndroid Build Coastguard Worker #define BASE_BUILD_TIME_H_ 7*635a8641SAndroid Build Coastguard Worker 8*635a8641SAndroid Build Coastguard Worker #include "base/base_export.h" 9*635a8641SAndroid Build Coastguard Worker #include "base/time/time.h" 10*635a8641SAndroid Build Coastguard Worker 11*635a8641SAndroid Build Coastguard Worker namespace base { 12*635a8641SAndroid Build Coastguard Worker 13*635a8641SAndroid Build Coastguard Worker // GetBuildTime returns the time at which the current binary was built, 14*635a8641SAndroid Build Coastguard Worker // rounded down to 5:00:00am at the start of the day in UTC. 15*635a8641SAndroid Build Coastguard Worker // 16*635a8641SAndroid Build Coastguard Worker // This uses a generated file, which doesn't trigger a rebuild when the time 17*635a8641SAndroid Build Coastguard Worker // changes. It will, however, be updated whenever //build/util/LASTCHANGE 18*635a8641SAndroid Build Coastguard Worker // changes. 19*635a8641SAndroid Build Coastguard Worker // 20*635a8641SAndroid Build Coastguard Worker // This value should only be considered accurate to within a day. 21*635a8641SAndroid Build Coastguard Worker // It will always be in the past. 22*635a8641SAndroid Build Coastguard Worker // 23*635a8641SAndroid Build Coastguard Worker // Note: If the build is not official (i.e. is_official_build = false) 24*635a8641SAndroid Build Coastguard Worker // this time will be set to 5:00:00am on the most recent first Sunday 25*635a8641SAndroid Build Coastguard Worker // of a month. 26*635a8641SAndroid Build Coastguard Worker Time BASE_EXPORT GetBuildTime(); 27*635a8641SAndroid Build Coastguard Worker 28*635a8641SAndroid Build Coastguard Worker } // namespace base 29*635a8641SAndroid Build Coastguard Worker 30*635a8641SAndroid Build Coastguard Worker #endif // BASE_BUILD_TIME_H_ 31