style: fmt

This commit is contained in:
2026-08-16 22:31:30 -05:00
parent 5216228f88
commit 02a4559268
+5 -2
View File
@@ -1,10 +1,10 @@
use core::net::SocketAddr;
use embassy_net::udp::{PacketMetadata, UdpSocket};
use embassy_time::{Duration, Timer};
use portable_atomic::{AtomicU64, Ordering};
use sntpc::{NtpContext, get_time};
use sntpc_net_embassy::UdpSocketWrapper;
use sntpc_time_embassy::EmbassyTimestampGenerator;
use portable_atomic::{AtomicU64, Ordering};
// NTP server (pool.ntp.org is the usual choice)
const NTP_SERVER: &str = "pool.ntp.org";
@@ -57,7 +57,10 @@ pub async fn ntp_upkeep_service(stack: embassy_net::Stack<'static>) {
loop {
match fetch_ntp_time(stack).await {
Ok(unix_secs) => {
NTP_BOOT_OFFSET.store(unix_secs - embassy_time::Instant::now().as_secs(), portable_atomic::Ordering::Relaxed);
NTP_BOOT_OFFSET.store(
unix_secs - embassy_time::Instant::now().as_secs(),
portable_atomic::Ordering::Relaxed,
);
Timer::after(Duration::from_secs(6 * 60 * 60)).await
}
Err(err) => {