mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
stagger the flush timing a little bit
noticed it's hitting exactly when NTP updates because it also happens on a 24-hour schedule, staggering a bit to try and keep everything from hitting exactly at the same time once a day.
This commit is contained in:
parent
2c815375a1
commit
e469736278
1 changed files with 1 additions and 1 deletions
|
|
@ -534,7 +534,7 @@ fn wrapped_main() -> ! {
|
|||
let tt = ticktimer_server::Ticktimer::new().unwrap();
|
||||
let mut flush_interval = 0;
|
||||
const ARBITRARY_INTERVAL_MS: usize = 12_513;
|
||||
const PERIODIC_FLUSH_MS: usize = 86_400_000; // one day
|
||||
const PERIODIC_FLUSH_MS: usize = 1000 * 60 * 60 * 18 - 5555; // every 18 hours less ~5 seconds to try and stagger the process off of other periodics
|
||||
loop {
|
||||
tt.sleep_ms(ARBITRARY_INTERVAL_MS).unwrap(); // arbitrary interval, but trying to avoid "round" numbers of seconds to interleave periodic tasks
|
||||
flush_interval += ARBITRARY_INTERVAL_MS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue