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

Unified Diff: runtime/platform/platform_os_win.cc

Issue 13641005: Add a sleep function to dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/platform/platform_os_win.cc
diff --git a/runtime/bin/test_extension_dllmain_win.cc b/runtime/platform/platform_os_win.cc
similarity index 50%
copy from runtime/bin/test_extension_dllmain_win.cc
copy to runtime/platform/platform_os_win.cc
index ba2199aa5b0908b309773deef059e5c943388713..8417d7edb1c248372b14af26fdd6c458e2bfd140 100644
--- a/runtime/bin/test_extension_dllmain_win.cc
+++ b/runtime/platform/platform_os_win.cc
@@ -1,17 +1,18 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h> // NOLINT
+#include "platform/platform_os.h"
-BOOL APIENTRY DllMain(HMODULE module,
- DWORD reason,
- LPVOID reserved) {
- return true;
+namespace platform {
+
+void OS::Sleep(int64_t millis) {
+ ::Sleep(millis);
}
+} // namespace platform
+
#endif // defined(TARGET_OS_WINDOWS)

Powered by Google App Engine
This is Rietveld 408576698