Skip to content

Commit 3e55b58

Browse files
committed
Adding timestamps to get an idea how long communication actually takes.
1 parent bd2fa96 commit 3e55b58

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/UDP_Client/UDP_Client.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ void loop()
141141
tc6_inst->write(udp_tx_msg_buf, tx_packet_size);
142142
tc6_inst->endPacket();
143143

144-
Serial.print("UDP_Client sending: \"");
144+
Serial.print("[");
145+
Serial.print(millis());
146+
Serial.print("] UDP_Client sending: \"");
145147
Serial.print(reinterpret_cast<char *>(udp_rx_msg_buf));
146148
Serial.println("\"");
147149
}
@@ -163,7 +165,9 @@ void loop()
163165
if (bytes_read > 0) {
164166
udp_rx_msg_buf[bytes_read] = 0;
165167
}
166-
Serial.print("UDP_Client received packet content: \"");
168+
Serial.print("[");
169+
Serial.print(millis());
170+
Serial.print("] UDP_Client received packet content: \"");
167171
Serial.print(reinterpret_cast<char *>(udp_rx_msg_buf));
168172
Serial.println("\"");
169173
}

0 commit comments

Comments
 (0)