| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_LINUX) | 6 #if defined(TARGET_OS_LINUX) |
| 7 | 7 |
| 8 #include <errno.h> // NOLINT | 8 #include <errno.h> // NOLINT |
| 9 #include <netdb.h> // NOLINT | 9 #include <netdb.h> // NOLINT |
| 10 #include <sys/time.h> // NOLINT | 10 #include <sys/time.h> // NOLINT |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 char* StringUtils::Utf8ToConsoleString( | 62 char* StringUtils::Utf8ToConsoleString( |
| 63 char* utf8, intptr_t len, intptr_t* result_len) { | 63 char* utf8, intptr_t len, intptr_t* result_len) { |
| 64 UNIMPLEMENTED(); | 64 UNIMPLEMENTED(); |
| 65 return NULL; | 65 return NULL; |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool ShellUtils::GetUtf8Argv(int argc, char** argv) { | 68 bool ShellUtils::GetUtf8Argv(int argc, char** argv) { |
| 69 return false; | 69 return false; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void TimerUtils::InitOnce() { |
| 73 } |
| 74 |
| 72 int64_t TimerUtils::GetCurrentMonotonicMillis() { | 75 int64_t TimerUtils::GetCurrentMonotonicMillis() { |
| 73 return GetCurrentMonotonicMicros() / 1000; | 76 return GetCurrentMonotonicMicros() / 1000; |
| 74 } | 77 } |
| 75 | 78 |
| 76 int64_t TimerUtils::GetCurrentMonotonicMicros() { | 79 int64_t TimerUtils::GetCurrentMonotonicMicros() { |
| 77 struct timespec ts; | 80 struct timespec ts; |
| 78 if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { | 81 if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { |
| 79 UNREACHABLE(); | 82 UNREACHABLE(); |
| 80 return 0; | 83 return 0; |
| 81 } | 84 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 104 ASSERT(errno == EINTR); | 107 ASSERT(errno == EINTR); |
| 105 // Copy remainder into requested and repeat. | 108 // Copy remainder into requested and repeat. |
| 106 req = rem; | 109 req = rem; |
| 107 } | 110 } |
| 108 } | 111 } |
| 109 | 112 |
| 110 } // namespace bin | 113 } // namespace bin |
| 111 } // namespace dart | 114 } // namespace dart |
| 112 | 115 |
| 113 #endif // defined(TARGET_OS_LINUX) | 116 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |