Skip to content

Commit

Permalink
removed commented out & dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
teodly committed Aug 30, 2024
1 parent f11ae90 commit 5904a4e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion statime-linux/src/clock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ impl PortTimestampToTime for LinuxClock {
impl PortTimestampToTime for OverlayClock<LinuxClock> {
fn port_timestamp_to_time(&self, ts: timestamped_socket::socket::Timestamp) -> Time {
let roclock_time = self.underlying().port_timestamp_to_time(ts);
//log::debug!("port_timestamp_to_time for OverlayClock called");
self.time_from_underlying(roclock_time)
}
}
Expand Down
1 change: 0 additions & 1 deletion statime-linux/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ trait PortClock: Clock<Error = <LinuxClock as Clock>::Error> + PortTimestampToTi
impl PortClock for LinuxClock {}
impl PortClock for SharedClock<OverlayClock<LinuxClock>> {}
type BoxedClock = Box<dyn PortClock + Send + Sync>;
//type SharedBoxedClock = SharedClock<BoxedClock>;
type SharedOverlayClock = SharedClock<OverlayClock<LinuxClock>>;

#[derive(Parser, Debug)]
Expand Down
5 changes: 0 additions & 5 deletions statime-linux/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6};

use statime::time::Time;
use timestamped_socket::{
interface::InterfaceName,
networkaddress::{EthernetAddress, MacAddress},
Expand Down Expand Up @@ -118,7 +117,3 @@ pub fn open_ethernet_socket(
socket.join_multicast(EthernetAddress::PDELAY_EVENT, interface)?;
Ok(socket)
}

pub fn timestamp_to_time(ts: timestamped_socket::socket::Timestamp) -> Time {
Time::from_fixed_nanos(ts.seconds as i128 * 1_000_000_000i128 + ts.nanos as i128)
}

0 comments on commit 5904a4e

Please sign in to comment.