mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01:00
Use thread::sleep instead of deprecated sleep_ms
Similarly, change one instance of `thread::park_timeout_ms`. Fixes #8694
This commit is contained in:
parent
b737e4e0fa
commit
3659218c59
10 changed files with 65 additions and 25 deletions
|
@ -298,7 +298,8 @@ impl Window {
|
|||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
fn handle_next_event(&self) -> bool {
|
||||
use std::thread::sleep_ms;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
// TODO(gw): This is an awful hack to work around the
|
||||
// broken way we currently call X11 from multiple threads.
|
||||
|
@ -324,7 +325,7 @@ impl Window {
|
|||
self.handle_window_event(event)
|
||||
}
|
||||
None => {
|
||||
sleep_ms(16);
|
||||
thread::sleep(Duration::from_millis(16));
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue