Rename 'clock' to 'time'

This commit is contained in:
Nils Andreas Svee committed 2022-10-29 22:30:19 +02:00
1 parent befccc0d6f
commit 13ba3eaffe
5 files changed
+12 -12

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
use crate::clock::Clock;
use crate::endian::ToNativeEndian;
use crate::pinger::{PingError, PingListener, PingReply, PingSender};
use crate::time::Time;
use etherparse::icmpv4::TimestampMessage;
use etherparse::TransportSlice::{Icmpv4, Icmpv6};
use etherparse::{Icmpv4Header, Icmpv4Type, SlicedPacket};
@@ -26,7 +26,7 @@ impl PingListener for PingerICMPTimestampListener {
});
}
let time_now = Clock::new(ClockId::Realtime);
let time_now = Time::new(ClockId::Realtime);
let time_since_midnight = time_now.get_time_since_midnight();
let originate_timestamp = reply.originate_timestamp.to_ne();
@@ -63,7 +63,7 @@ impl PingListener for PingerICMPTimestampListener {
impl PingSender for PingerICMPTimestampSender {
fn craft_packet(&self, id: u16, seq: u16) -> Vec<u8> {
let time_since_midnight = Clock::new(ClockId::Realtime).get_time_since_midnight();
let time_since_midnight = Time::new(ClockId::Realtime).get_time_since_midnight();
let payload: [u8; 0] = [];