Skip to content

Commit

Permalink
Fix build failure on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
jvns committed Apr 2, 2021
1 parent d72c929 commit 423c739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl PacketCodec for PrintCodec {

fn get_time(packet: &Packet) -> DateTime<Utc> {
let packet_time = packet.header.ts;
let micros = (packet_time.tv_sec * 1000000 + packet_time.tv_usec) as u64;
let micros = ((packet_time.tv_sec * 1000000) as u64) + (packet_time.tv_usec as u64);
DateTime::<Utc>::from(time::UNIX_EPOCH + time::Duration::from_micros(micros))
}

Expand Down

0 comments on commit 423c739

Please sign in to comment.