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 "vm/os.h" | 5 #include "vm/os.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <mach/mach.h> | 9 #include <mach/mach.h> |
10 #include <mach/clock.h> | 10 #include <mach/clock.h> |
11 #include <mach/mach_time.h> | 11 #include <mach/mach_time.h> |
12 #include <sys/time.h> | 12 #include <sys/time.h> |
13 #include <sys/resource.h> | 13 #include <sys/resource.h> |
14 #include <unistd.h> | 14 #include <unistd.h> |
15 | 15 |
| 16 #include "platform/utils.h" |
16 #include "vm/isolate.h" | 17 #include "vm/isolate.h" |
17 #include "vm/utils.h" | |
18 | 18 |
19 namespace dart { | 19 namespace dart { |
20 | 20 |
21 bool OS::BreakDownSecondsSinceEpoch(time_t seconds_since_epoch, | 21 bool OS::BreakDownSecondsSinceEpoch(time_t seconds_since_epoch, |
22 bool in_utc, | 22 bool in_utc, |
23 BrokenDownDate* result) { | 23 BrokenDownDate* result) { |
24 struct tm tm_result; | 24 struct tm tm_result; |
25 struct tm* error_code; | 25 struct tm* error_code; |
26 if (in_utc) { | 26 if (in_utc) { |
27 error_code = gmtime_r(&seconds_since_epoch, &tm_result); | 27 error_code = gmtime_r(&seconds_since_epoch, &tm_result); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void OS::Abort() { | 193 void OS::Abort() { |
194 abort(); | 194 abort(); |
195 } | 195 } |
196 | 196 |
197 | 197 |
198 void OS::Exit(int code) { | 198 void OS::Exit(int code) { |
199 exit(code); | 199 exit(code); |
200 } | 200 } |
201 | 201 |
202 } // namespace dart | 202 } // namespace dart |
OLD | NEW |