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/time.h" | 5 #include "base/time/time.h" |
6 | 6 |
7 #include <sys/time.h> | 7 #include <sys/time.h> |
8 #include <time.h> | 8 #include <time.h> |
9 #if defined(OS_ANDROID) | 9 #if defined(OS_ANDROID) |
10 #include <time64.h> | 10 #include <time64.h> |
11 #endif | 11 #endif |
12 #include <unistd.h> | 12 #include <unistd.h> |
13 | 13 |
14 #include <limits> | 14 #include <limits> |
15 | 15 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 result.tv_usec = static_cast<suseconds_t>(Time::kMicrosecondsPerSecond) - 1; | 319 result.tv_usec = static_cast<suseconds_t>(Time::kMicrosecondsPerSecond) - 1; |
320 return result; | 320 return result; |
321 } | 321 } |
322 int64 us = us_ - kTimeTToMicrosecondsOffset; | 322 int64 us = us_ - kTimeTToMicrosecondsOffset; |
323 result.tv_sec = us / Time::kMicrosecondsPerSecond; | 323 result.tv_sec = us / Time::kMicrosecondsPerSecond; |
324 result.tv_usec = us % Time::kMicrosecondsPerSecond; | 324 result.tv_usec = us % Time::kMicrosecondsPerSecond; |
325 return result; | 325 return result; |
326 } | 326 } |
327 | 327 |
328 } // namespace base | 328 } // namespace base |
OLD | NEW |