Skip to content

Instantly share code, notes, and snippets.

@megumish
Created April 25, 2020 15:06
Show Gist options
  • Save megumish/95241bcb0b25f837c2c1ce440e18cc3b to your computer and use it in GitHub Desktop.
Save megumish/95241bcb0b25f837c2c1ce440e18cc3b to your computer and use it in GitHub Desktop.
diff --git a/src/exec.rs b/src/exec.rs
index 215d849..7ef8f67 100644
--- a/src/exec.rs
+++ b/src/exec.rs
@@ -4,6 +4,7 @@ use std::thread::sleep;
use rand::Rng;
use wasm_timer::Delay;
+use futures::poll;
use super::console;
use super::visualization;
@@ -214,7 +215,7 @@ pub fn run (
if mode {
console::log("wait");
// sleep(Duration::new(1, 0)); // Runtime Error が起こる
- Delay::new(Duration::from_millis(1000)); // 遅延してくれない
+ poll(Delay::new(Duration::from_millis(1000))); // 遅延してくれない
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment