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