Implement Poll and WaitUntil in the stdweb backend

This commit is contained in:
Ryan Goldstein 2019-06-16 21:30:05 -07:00
parent b59e3c670b
commit 2690306f4a
5 changed files with 115 additions and 45 deletions

View file

@ -4,7 +4,7 @@
//! processed and used to modify the program state. For more details, see the root-level documentation.
//!
//! [event_loop_run]: ../event_loop/struct.EventLoop.html#method.run
use std::time::Instant;
use instant::Instant;
use std::path::PathBuf;
use dpi::{LogicalPosition, LogicalSize};
@ -58,7 +58,7 @@ impl<T> Event<T> {
}
/// Describes the reason the event loop is resuming.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum StartCause {
/// Sent if the time specified by `ControlFlow::WaitUntil` has been reached. Contains the
/// moment the timeout was requested and the requested resume time. The actual resume time is