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

Unified Diff: runtime/bin/utils_macos.cc

Issue 13704003: Reapply "Add a sleep function to dart:io" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added "hide sleep" where needed Created 7 years, 8 months 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
Index: runtime/bin/utils_macos.cc
diff --git a/runtime/bin/utils_macos.cc b/runtime/bin/utils_macos.cc
index 1c79c0da5c99c1ca554f8ef155687e01725ccc36..f717eddc92e15d640075393e8a444276530dd7d9 100644
--- a/runtime/bin/utils_macos.cc
+++ b/runtime/bin/utils_macos.cc
@@ -87,4 +87,8 @@ int64_t TimerUtils::GetCurrentTimeMicros() {
return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
}
+void TimerUtils::Sleep(int64_t millis) {
+ usleep(millis * 1000);
+}
+
#endif // defined(TARGET_OS_MACOS)

Powered by Google App Engine
This is Rietveld 408576698