Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Side by Side Diff: runtime/bin/utils_macos.cc

Issue 1537063002: Initialize standalone embedder's copy of the monotonic clock on Windows. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/utils_linux.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include <errno.h> // NOLINT 8 #include <errno.h> // NOLINT
9 #include <netdb.h> // NOLINT 9 #include <netdb.h> // NOLINT
10 #include <mach/mach.h> // NOLINT 10 #include <mach/mach.h> // NOLINT
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 char* StringUtils::Utf8ToConsoleString( 67 char* StringUtils::Utf8ToConsoleString(
68 char* utf8, intptr_t len, intptr_t* result_len) { 68 char* utf8, intptr_t len, intptr_t* result_len) {
69 UNIMPLEMENTED(); 69 UNIMPLEMENTED();
70 return NULL; 70 return NULL;
71 } 71 }
72 72
73 bool ShellUtils::GetUtf8Argv(int argc, char** argv) { 73 bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
74 return false; 74 return false;
75 } 75 }
76 76
77 void TimerUtils::InitOnce() {
78 }
79
77 int64_t TimerUtils::GetCurrentMonotonicMillis() { 80 int64_t TimerUtils::GetCurrentMonotonicMillis() {
78 return GetCurrentMonotonicMicros() / 1000; 81 return GetCurrentMonotonicMicros() / 1000;
79 } 82 }
80 83
81 int64_t TimerUtils::GetCurrentMonotonicMicros() { 84 int64_t TimerUtils::GetCurrentMonotonicMicros() {
82 #if TARGET_OS_IOS 85 #if TARGET_OS_IOS
83 // On iOS mach_absolute_time stops while the device is sleeping. Instead use 86 // On iOS mach_absolute_time stops while the device is sleeping. Instead use
84 // now - KERN_BOOTTIME to get a time difference that is not impacted by clock 87 // now - KERN_BOOTTIME to get a time difference that is not impacted by clock
85 // changes. KERN_BOOTTIME will be updated by the system whenever the system 88 // changes. KERN_BOOTTIME will be updated by the system whenever the system
86 // clock change. 89 // clock change.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ASSERT(errno == EINTR); 135 ASSERT(errno == EINTR);
133 // Copy remainder into requested and repeat. 136 // Copy remainder into requested and repeat.
134 req = rem; 137 req = rem;
135 } 138 }
136 } 139 }
137 140
138 } // namespace bin 141 } // namespace bin
139 } // namespace dart 142 } // namespace dart
140 143
141 #endif // defined(TARGET_OS_MACOS) 144 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/utils_linux.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698