OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_OS_H_ | 5 #ifndef VM_OS_H_ |
6 #define VM_OS_H_ | 6 #define VM_OS_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 | 9 |
10 // Forward declarations. | 10 // Forward declarations. |
11 struct tm; | 11 struct tm; |
12 | 12 |
13 namespace dart { | 13 namespace dart { |
14 | 14 |
15 // Forward declarations. | 15 // Forward declarations. |
16 class Isolate; | 16 class Isolate; |
17 | 17 |
18 // Interface to the underlying OS platform. | 18 // Interface to the underlying OS platform. |
19 class OS { | 19 class OS { |
20 public: | 20 public: |
| 21 // Returns the name of the given OS. For example "linux". |
| 22 static const char* Name(); |
| 23 |
21 // Returns the abbreviated time-zone name for the given instant. | 24 // Returns the abbreviated time-zone name for the given instant. |
22 // For example "CET" or "CEST". | 25 // For example "CET" or "CEST". |
23 static const char* GetTimeZoneName(int64_t seconds_since_epoch); | 26 static const char* GetTimeZoneName(int64_t seconds_since_epoch); |
24 | 27 |
25 // Returns the difference in seconds between local time and UTC for the given | 28 // Returns the difference in seconds between local time and UTC for the given |
26 // instant. | 29 // instant. |
27 // For example 3600 for CET, and 7200 for CEST. | 30 // For example 3600 for CET, and 7200 for CEST. |
28 static int GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch); | 31 static int GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch); |
29 | 32 |
30 // Returns the difference in seconds between local time and UTC when no | 33 // Returns the difference in seconds between local time and UTC when no |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 static void Shutdown(); | 131 static void Shutdown(); |
129 | 132 |
130 static void Abort(); | 133 static void Abort(); |
131 | 134 |
132 static void Exit(int code); | 135 static void Exit(int code); |
133 }; | 136 }; |
134 | 137 |
135 } // namespace dart | 138 } // namespace dart |
136 | 139 |
137 #endif // VM_OS_H_ | 140 #endif // VM_OS_H_ |
OLD | NEW |