Skip to content

Commit 601f347

Browse files
committed
initial delay on NTP poller
no point in clogging up the boot sequence with requests that will almost certainly fail.
1 parent 4264231 commit 601f347

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/vault/src/prereqs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ pub(crate) fn ntp_updater(time_conn: xous::CID) {
180180
let tt = ticktimer_server::Ticktimer::new().unwrap();
181181
let mut now = SystemTime::now();
182182
let mut force_update = true;
183+
tt.sleep_ms(1000 * 60 * 2); // initial delay of 2 minutes before polling. This gives plenty of time for network to come up.
183184
loop {
184185
if force_update || now.elapsed().unwrap().as_secs() > 3600 * 24 { // once a day in real time
185186
// check if we have a network connection. if not, repeat the loop, after a short delay

0 commit comments

Comments
 (0)