awk '/Internet connected/ {print $0" "substr($NF,1,2)*3600+substr($NF,4,2)*60+substr($NF,7,2)}' </var/log/messages | while IFS= read -r S; do
current="$(echo "$S"|awk '{print $NF}')"
[ -n "$prev" ] && delta="$(echo "$prev $current"|awk '{print ($NF-$1)}')"
prev="$current"
echo "$S delta=$delta" | sed -r 's/(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/xxx.xxx.xxx.xxx/g'
done
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 02:50:08 10208 delta=
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 05:27:38 19658 delta=9450
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 08:05:09 29109 delta=9451
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 10:42:39 38559 delta=9450
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 13:20:10 48010 delta=9451
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 15:57:40 57460 delta=9450
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 18:35:11 66911 delta=9451
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 21:12:41 76361 delta=9450
[Internet connected] IP address: xxx.xxx.xxx.xxx, Thursday, June 08, 2023 23:50:10 85810 delta=9449