Skip to main content

should_remind_screen_time

Function should_remind_screen_time 

Source
pub fn should_remind_screen_time(
    enabled: bool,
    counter_secs: u64,
    budget_secs: u64,
    last_reminder_epoch_secs: Option<u64>,
    remind_again_secs: u64,
    now_epoch_secs: u64,
) -> bool
Expand description

Decide whether to fire the daily-budget reminder this tick. Returns true when the feature is on, the budget is non-zero, the counter has crossed the budget, and either no reminder has fired yet today or the snooze window has elapsed (remind_again_secs == 0 means fire once per day only).