mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
This commit is contained in:
parent
7b87085c18
commit
ef8edd4e87
168 changed files with 2247 additions and 2408 deletions
|
@ -6,10 +6,8 @@
|
|||
|
||||
use compositor_task::{CompositorProxy, Msg};
|
||||
|
||||
use std::old_io::timer;
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use std::thread::Builder;
|
||||
use std::time::duration::Duration;
|
||||
use std::thread::{Builder, sleep_ms};
|
||||
use time;
|
||||
|
||||
/// The amount of time in nanoseconds that we give to the painting thread to paint new tiles upon
|
||||
|
@ -61,8 +59,8 @@ impl ScrollingTimer {
|
|||
match self.receiver.recv() {
|
||||
Ok(ToScrollingTimerMsg::ScrollEventProcessedMsg(timestamp)) => {
|
||||
let target = timestamp as i64 + TIMEOUT;
|
||||
let delta = target - (time::precise_time_ns() as i64);
|
||||
timer::sleep(Duration::nanoseconds(delta));
|
||||
let delta_ns = target - (time::precise_time_ns() as i64);
|
||||
sleep_ms((delta_ns / 1000) as u32);
|
||||
self.compositor_proxy.send(Msg::ScrollTimeout(timestamp));
|
||||
}
|
||||
Ok(ToScrollingTimerMsg::ExitMsg) | Err(_) => break,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue