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

Side by Side Diff: runtime/vm/os_fuchsia.cc

Issue 2822833002: [fuchsia] Use new mx_deadline_after interface (Closed)
Patch Set: [fuchsia] Use new mx_deadline_after interface Created 3 years, 8 months 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_fuchsia.cc ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(HOST_OS_FUCHSIA) 6 #if defined(HOST_OS_FUCHSIA)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> 10 #include <errno.h>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 157
158 uintptr_t OS::MaxRSS() { 158 uintptr_t OS::MaxRSS() {
159 // TODO(US-95): Implement. 159 // TODO(US-95): Implement.
160 return 0; 160 return 0;
161 } 161 }
162 162
163 163
164 void OS::Sleep(int64_t millis) { 164 void OS::Sleep(int64_t millis) {
165 mx_nanosleep(millis * kMicrosecondsPerMillisecond * 165 SleepMicros(millis * kMicrosecondsPerMillisecond);
166 kNanosecondsPerMicrosecond);
167 } 166 }
168 167
169 168
170 void OS::SleepMicros(int64_t micros) { 169 void OS::SleepMicros(int64_t micros) {
171 mx_nanosleep(micros * kNanosecondsPerMicrosecond); 170 mx_nanosleep(mx_deadline_after(micros * kNanosecondsPerMicrosecond));
172 } 171 }
173 172
174 173
175 void OS::DebugBreak() { 174 void OS::DebugBreak() {
176 UNIMPLEMENTED(); 175 UNIMPLEMENTED();
177 } 176 }
178 177
179 178
180 uintptr_t DART_NOINLINE OS::GetProgramCounter() { 179 uintptr_t DART_NOINLINE OS::GetProgramCounter() {
181 return reinterpret_cast<uintptr_t>( 180 return reinterpret_cast<uintptr_t>(
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 310 }
312 311
313 312
314 void OS::Exit(int code) { 313 void OS::Exit(int code) {
315 UNIMPLEMENTED(); 314 UNIMPLEMENTED();
316 } 315 }
317 316
318 } // namespace dart 317 } // namespace dart
319 318
320 #endif // defined(HOST_OS_FUCHSIA) 319 #endif // defined(HOST_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/bin/utils_fuchsia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698