mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
fix time measure
This commit is contained in:
parent
98fe118be4
commit
054d65763d
6 changed files with 29 additions and 32 deletions
|
@ -33,7 +33,6 @@ extern crate servo_arc;
|
|||
extern crate servo_atoms;
|
||||
extern crate servo_url;
|
||||
extern crate style;
|
||||
extern crate time;
|
||||
extern crate webrender_api;
|
||||
|
||||
pub mod message;
|
||||
|
|
|
@ -24,7 +24,6 @@ use style::context::QuirksMode;
|
|||
use style::properties::PropertyId;
|
||||
use style::selector_parser::PseudoElement;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use time;
|
||||
|
||||
/// Asynchronous messages that script can send to layout.
|
||||
pub enum Msg {
|
||||
|
@ -172,26 +171,6 @@ impl ReflowGoal {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the timestamp of query message.
|
||||
pub fn set_timestamp(&mut self) {
|
||||
match *self {
|
||||
ReflowGoal::LayoutQuery(_, ref mut timestamp) => {
|
||||
*timestamp = time::precise_time_ns();
|
||||
},
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the query timestamp.
|
||||
pub fn timestamp(&self) -> Option<u64> {
|
||||
match *self {
|
||||
ReflowGoal::LayoutQuery(_, ref timestamp) => {
|
||||
Some(*timestamp)
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Information needed for a reflow.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue