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

Unified Diff: web/inc/luci-sleep-promise/promise.ts

Issue 2543323004: Rewrite LogDog log viewer app. (Closed)
Patch Set: Control all fetch sizes, fix follow on initial click, fix small fetch when auth is retrid. Created 4 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
Index: web/inc/luci-sleep-promise/promise.ts
diff --git a/web/inc/luci-sleep-promise/promise.ts b/web/inc/luci-sleep-promise/promise.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a8221c42ee1f1923cb2c08dcecfd172ad87a8f80
--- /dev/null
+++ b/web/inc/luci-sleep-promise/promise.ts
@@ -0,0 +1,11 @@
+/*
+ Copyright 2016 The LUCI Authors. All rights reserved.
+ Use of this source code is governed under the Apache License, Version 2.0
+ that can be found in the LICENSE file.
+*/
+
+export function sleep(delay: number): Promise<void> {
+ return new Promise<void>( (resolve, reject) => {
+ window.setTimeout(resolve, delay);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698