| 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". | 21 // Returns the name of the given OS. For example "linux". |
| 22 static const char* Name(); | 22 static const char* Name(); |
| 23 | 23 |
| 24 // Returns the current process id. |
| 25 static intptr_t ProcessId(); |
| 26 |
| 24 // Returns the abbreviated time-zone name for the given instant. | 27 // Returns the abbreviated time-zone name for the given instant. |
| 25 // For example "CET" or "CEST". | 28 // For example "CET" or "CEST". |
| 26 static const char* GetTimeZoneName(int64_t seconds_since_epoch); | 29 static const char* GetTimeZoneName(int64_t seconds_since_epoch); |
| 27 | 30 |
| 28 // Returns the difference in seconds between local time and UTC for the given | 31 // Returns the difference in seconds between local time and UTC for the given |
| 29 // instant. | 32 // instant. |
| 30 // For example 3600 for CET, and 7200 for CEST. | 33 // For example 3600 for CET, and 7200 for CEST. |
| 31 static int GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch); | 34 static int GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch); |
| 32 | 35 |
| 33 // Returns the difference in seconds between local time and UTC when no | 36 // 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... |
| 131 static void Shutdown(); | 134 static void Shutdown(); |
| 132 | 135 |
| 133 static void Abort(); | 136 static void Abort(); |
| 134 | 137 |
| 135 static void Exit(int code); | 138 static void Exit(int code); |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 } // namespace dart | 141 } // namespace dart |
| 139 | 142 |
| 140 #endif // VM_OS_H_ | 143 #endif // VM_OS_H_ |
| OLD | NEW |