Commit b5377c63 authored by Simon Wörner's avatar Simon Wörner

fixed invalid measure warnings, fixed AsyncPort file open

parent 065a2d02
......@@ -205,9 +205,10 @@ impl SyncPort {
impl AsyncPort {
pub fn new(number: u8, edge: Edge) -> std::io::Result<AsyncPort> {
let port = Port::new(number, Direction::In)?;
let file = AsyncPort::open(number)?;
let port = AsyncPort {
port: Port::new(number, Direction::In)?,
port: port,
edge: edge,
file: file,
fds: [nix::poll::PollFd::new(file, nix::poll::POLLPRI, nix::poll::EventFlags::empty())],
......
......@@ -25,11 +25,6 @@ impl Measure {
}
pub fn start(&mut self) {
if self.last == 0 {
#[cfg(debug_assertions)]
println!("WARNING: Measure('{:?}') start called without stop!", self);
}
self.last = precise_time_ns();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment