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 #ifndef BIN_UTILS_H_ | 5 #ifndef BIN_UTILS_H_ |
6 #define BIN_UTILS_H_ | 6 #define BIN_UTILS_H_ |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Convert all the arguments to UTF8. On Windows, the arguments are | 91 // Convert all the arguments to UTF8. On Windows, the arguments are |
92 // encoded in the current code page and not UTF8. | 92 // encoded in the current code page and not UTF8. |
93 // | 93 // |
94 // Returns true if the arguments are converted. In that case | 94 // Returns true if the arguments are converted. In that case |
95 // each of the arguments need to be deallocated using free. | 95 // each of the arguments need to be deallocated using free. |
96 static bool GetUtf8Argv(int argc, char** argv); | 96 static bool GetUtf8Argv(int argc, char** argv); |
97 }; | 97 }; |
98 | 98 |
99 class TimerUtils { | 99 class TimerUtils { |
100 public: | 100 public: |
101 static int64_t GetCurrentTimeMicros(); | 101 static int64_t GetCurrentMonotonicMicros(); |
102 static int64_t GetCurrentTimeMilliseconds(); | 102 static int64_t GetCurrentMonotonicMillis(); |
103 static void Sleep(int64_t millis); | 103 static void Sleep(int64_t millis); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace bin | 106 } // namespace bin |
107 } // namespace dart | 107 } // namespace dart |
108 | 108 |
109 #endif // BIN_UTILS_H_ | 109 #endif // BIN_UTILS_H_ |
OLD | NEW |