1 // Copyright (c) 2012 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 5 #include "base/process/process_info.h" 6 7 #include <windows.h> 8 9 #include "base/basictypes.h" 10 #include "base/time/time.h" 11 12 namespace base { 13 14 //static 15 const Time CurrentProcessInfo::CreationTime() { 16 FILETIME creation_time = {}; 17 FILETIME ignore = {}; 18 if (::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, 19 &ignore, &ignore) == false) 20 return Time(); 21 22 return Time::FromFileTime(creation_time); 23 } 24 25 } // namespace base 26