mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make TimeStamp in event.rs return the actual timestamp
This commit is contained in:
parent
8af9ce07f8
commit
af548696bb
1 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
extern crate time;
|
||||
|
||||
use dom::bindings::codegen::EventBinding;
|
||||
use dom::bindings::codegen::EventBinding::EventConstants;
|
||||
use dom::bindings::js::JS;
|
||||
|
@ -54,6 +56,7 @@ pub struct Event {
|
|||
pub trusted: bool,
|
||||
pub dispatching: bool,
|
||||
pub initialized: bool,
|
||||
pub timestamp: u64,
|
||||
}
|
||||
|
||||
impl Event {
|
||||
|
@ -73,6 +76,7 @@ impl Event {
|
|||
stop_propagation: false,
|
||||
stop_immediate: false,
|
||||
initialized: false,
|
||||
timestamp: time::get_time().sec as u64,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +130,7 @@ impl Event {
|
|||
}
|
||||
|
||||
pub fn TimeStamp(&self) -> u64 {
|
||||
0
|
||||
return self.timestamp;
|
||||
}
|
||||
|
||||
pub fn InitEvent(&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue