mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
compositing: Fix scrolling timeout. There are 1,000,000 nanoseconds in a
millisecond.
This commit is contained in:
parent
2baa69595e
commit
55442db3b2
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ impl ScrollingTimer {
|
||||||
Ok(ToScrollingTimerMsg::ScrollEventProcessedMsg(timestamp)) => {
|
Ok(ToScrollingTimerMsg::ScrollEventProcessedMsg(timestamp)) => {
|
||||||
let target = timestamp as i64 + TIMEOUT;
|
let target = timestamp as i64 + TIMEOUT;
|
||||||
let delta_ns = target - (time::precise_time_ns() as i64);
|
let delta_ns = target - (time::precise_time_ns() as i64);
|
||||||
sleep_ms((delta_ns / 1000) as u32);
|
sleep_ms((delta_ns / 1000000) as u32);
|
||||||
self.compositor_proxy.send(Msg::ScrollTimeout(timestamp));
|
self.compositor_proxy.send(Msg::ScrollTimeout(timestamp));
|
||||||
}
|
}
|
||||||
Ok(ToScrollingTimerMsg::ExitMsg) | Err(_) => break,
|
Ok(ToScrollingTimerMsg::ExitMsg) | Err(_) => break,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue