diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-01 16:01:25 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-01 22:18:16 +0100 |
commit | a483fb59a8dd908a3e4b20d62410d022d511eaa8 (patch) | |
tree | a386f49898eed84c884c435598d675af6a1aeff7 /src/core/unit.h | |
parent | 393003e1debf7c7f75beaacbd532b92c3e3dc729 (diff) |
core: store for each unit when the last low-level unit state change took place
This adds a new timestamp field to the Unit struct, storing when the last low-level state change took place, and make
sure this is restored after a daemon reload. This new field is useful to allow restarting of per-state timers exactly
where they originally started.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index 3eb3484fb7..f86a0f687b 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -121,6 +121,10 @@ struct Unit { dual_timestamp condition_timestamp; dual_timestamp assert_timestamp; + /* Updated whenever the low-level state changes */ + dual_timestamp state_change_timestamp; + + /* Updated whenever the (high-level) active state enters or leaves the active or inactive states */ dual_timestamp inactive_exit_timestamp; dual_timestamp active_enter_timestamp; dual_timestamp active_exit_timestamp; |