| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/process/internal_linux.h" | 5 #include "base/process/internal_linux.h" |
| 6 | 6 |
| 7 #include <limits.h> |
| 7 #include <unistd.h> | 8 #include <unistd.h> |
| 8 | 9 |
| 9 #include <map> | 10 #include <map> |
| 10 #include <string> | 11 #include <string> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 14 #include "base/logging.h" | 15 #include "base/logging.h" |
| 15 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // which means the answer is 100. | 180 // which means the answer is 100. |
| 180 // It may be the case that this value is always 100. | 181 // It may be the case that this value is always 100. |
| 181 static const int kHertz = sysconf(_SC_CLK_TCK); | 182 static const int kHertz = sysconf(_SC_CLK_TCK); |
| 182 | 183 |
| 183 return TimeDelta::FromMicroseconds( | 184 return TimeDelta::FromMicroseconds( |
| 184 Time::kMicrosecondsPerSecond * clock_ticks / kHertz); | 185 Time::kMicrosecondsPerSecond * clock_ticks / kHertz); |
| 185 } | 186 } |
| 186 | 187 |
| 187 } // namespace internal | 188 } // namespace internal |
| 188 } // namespace base | 189 } // namespace base |
| OLD | NEW |