Skip to main content

alarm_news

Function alarm_news 

Source
pub fn alarm_news(
    memory: &Path,
    folder: &Path,
    own: &str,
    key: [u8; 32],
    login: Option<Login>,
    lock: &'static Mutex<()>,
    since: i64,
    clock: Arc<dyn Fn() -> i64 + Send + Sync>,
    ask: &mut dyn FnMut() -> Duration,
) -> AlarmNews
Expand description

What a dose’s or a waking’s alarm reads before it decides, since its start (Unix seconds), on a phone whose folder is found on the server (State::fetching; docs/android.md, “Doses while Sioul is away”). Sioul’s own pull alone is trusted only once a pull begun since the alarm went through (State::went_through_since; in this process, by its steady clock: PULLED): this one, or another’s that ran meanwhile in this process (lock, one pull at a time: another alarm’s, the window’s), waited for, never passed over. A pull that fails, or has not gone through within times.alone: the sync app asked as before (ask, which asks it and says how long its wait still runs: twenty seconds, less when another alarm asked it a moment ago), and waited for, that wait ended as soon as a pull since the alarm goes through; times.most in all at most. clock gives the time now (Unix seconds); key opens the others’ entries and claims.