Compare commits
2 Commits
9f273bcd3c
...
ad9f2c061d
Author | SHA1 | Date |
---|---|---|
Florian Schmaus | ad9f2c061d | |
Florian Schmaus | d7e58758a6 |
|
@ -411,6 +411,10 @@ int manager_get_idle_hint(Manager *m, dual_timestamp *t) {
|
|||
|
||||
assert(m);
|
||||
|
||||
/* Initialize the baseline timestamp with the time the manager got initialized to avoid reporting
|
||||
* unreasonable large idle periods starting with the Unix epoch. */
|
||||
ts = m->init_ts;
|
||||
|
||||
idle_hint = !manager_is_inhibited(m, INHIBIT_IDLE, /* block= */ true, t, false, false, 0, NULL);
|
||||
|
||||
HASHMAP_FOREACH(s, m->sessions) {
|
||||
|
|
|
@ -100,6 +100,8 @@ static int manager_new(Manager **ret) {
|
|||
|
||||
(void) sd_event_set_watchdog(m->event, true);
|
||||
|
||||
dual_timestamp_now(&m->init_ts);
|
||||
|
||||
manager_reset_config(m);
|
||||
|
||||
*ret = TAKE_PTR(m);
|
||||
|
|
|
@ -145,6 +145,8 @@ struct Manager {
|
|||
struct stat efi_loader_entry_one_shot_stat;
|
||||
|
||||
CalendarSpec *maintenance_time;
|
||||
|
||||
dual_timestamp init_ts;
|
||||
};
|
||||
|
||||
void manager_reset_config(Manager *m);
|
||||
|
|
Loading…
Reference in New Issue