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

Unified Diff: runtime/vm/os_win.cc

Issue 109803002: Profiler Take 2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | runtime/vm/profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_win.cc
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index fcb8447c6333d8c2932b6ec4b06d733faec4da0d..98e864eb93920207a162bfc4cd222865392f58e9 100644
--- a/runtime/vm/os_win.cc
+++ b/runtime/vm/os_win.cc
@@ -174,6 +174,16 @@ void OS::Sleep(int64_t millis) {
}
+void OS::SleepMicros(int64_t micros) {
+ // Windows only supports millisecond sleeps.
+ if (micros < kMicrosecondsPerMillisecond) {
+ // Calling ::Sleep with 0 has no determined behaviour, round up.
+ micros = kMicrosecondsPerMillisecond;
+ }
+ OS::Sleep(micros / kMicrosecondsPerMillisecond);
+}
+
+
void OS::DebugBreak() {
#if defined(_MSC_VER)
// Microsoft Visual C/C++ or drop-in replacement.
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | runtime/vm/profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698