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

Unified Diff: runtime/bin/utils_linux.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_linux.cc
diff --git a/runtime/bin/utils_linux.cc b/runtime/bin/utils_linux.cc
index 39dcce687b3976ead549ea317a09e8b54c79706f..3defd39c0f48c705c00569cbfd57994e612f6270 100644
--- a/runtime/bin/utils_linux.cc
+++ b/runtime/bin/utils_linux.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_LINUX)

Powered by Google App Engine
This is Rietveld 408576698