Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: runtime/bin/utils.h

Issue 1519563003: Use a monotonic clock in the implementation of Timer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/utils_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/utils_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698