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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 static void FreeUnicodeArgv(wchar_t** argv); | 82 static void FreeUnicodeArgv(wchar_t** argv); |
83 }; | 83 }; |
84 | 84 |
85 class TimerUtils { | 85 class TimerUtils { |
86 public: | 86 public: |
87 static int64_t GetCurrentTimeMicros(); | 87 static int64_t GetCurrentTimeMicros(); |
88 static int64_t GetCurrentTimeMilliseconds(); | 88 static int64_t GetCurrentTimeMilliseconds(); |
89 static void Sleep(int64_t millis); | 89 static void Sleep(int64_t millis); |
90 }; | 90 }; |
91 | 91 |
92 class ProfilerBlocker { | |
Anders Johnsen
2014/05/25 18:36:34
Stuff like this usually go into dartutils.h.
Cutch
2014/05/26 06:59:35
Done and renamed to ScopedBlockingCall
| |
93 public: | |
94 ProfilerBlocker() { | |
95 Dart_BlockProfiler(); | |
96 } | |
97 | |
98 ~ProfilerBlocker() { | |
99 Dart_UnblockProfiler(); | |
100 } | |
101 }; | |
102 | |
92 } // namespace bin | 103 } // namespace bin |
93 } // namespace dart | 104 } // namespace dart |
94 | 105 |
95 #endif // BIN_UTILS_H_ | 106 #endif // BIN_UTILS_H_ |
OLD | NEW |