diff options
Diffstat (limited to 'base/process_util_posix.cc')
-rw-r--r-- | base/process_util_posix.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 4d2f1e5..7439979 100644 --- a/base/process_util_posix.cc +++ b/base/process_util_posix.cc @@ -8,6 +8,7 @@ #include <unistd.h> #include "base/basictypes.h" +#include "base/sys_info.h" namespace process_util { @@ -23,6 +24,19 @@ int GetProcId(ProcessHandle process) { return process; } +ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process), + last_time_(0), + last_system_time_(0) { + processor_count_ = base::SysInfo::NumberOfProcessors(); +} + +// static +ProcessMetrics* ProcessMetrics::CreateProcessMetrics(ProcessHandle process) { + return new ProcessMetrics(process); +} + +ProcessMetrics::~ProcessMetrics() { } + void EnableTerminationOnHeapCorruption() { // On POSIX, there nothing to do AFAIK. } |