Skip to content

Commit

Permalink
Make TimeStamp in event.rs return the actual timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
gsingh93 committed Apr 30, 2014
1 parent 8af9ce0 commit af54869
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/script/dom/event.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -54,6 +56,7 @@ pub struct Event {
pub trusted: bool,
pub dispatching: bool,
pub initialized: bool,
pub timestamp: u64,
}

impl Event {
Expand All @@ -73,6 +76,7 @@ impl Event {
stop_propagation: false,
stop_immediate: false,
initialized: false,
timestamp: time::get_time().sec as u64,
}
}

Expand Down Expand Up @@ -126,7 +130,7 @@ impl Event {
}

pub fn TimeStamp(&self) -> u64 {
0
return self.timestamp;
}

pub fn InitEvent(&mut self,
Expand Down

0 comments on commit af54869

Please sign in to comment.