summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-timer.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-11-10 13:29:04 +0100
committerGitHub <noreply@github.com>2020-11-10 13:29:04 +0100
commit394131d5be587858d67764bee65198f4a7fe7442 (patch)
tree0bcbdc07fcd1990e78183e0d25c719d9f94bafd6 /src/core/dbus-timer.c
parentAdd Logitech G403 Prodigy Gaming Mouse to hwdb. (#17537) (diff)
parenttimer: add new feature FixedRandomDelay= (diff)
downloadsystemd-394131d5be587858d67764bee65198f4a7fe7442.tar.xz
systemd-394131d5be587858d67764bee65198f4a7fe7442.zip
Merge pull request #17497 from anitazha/randomizeonce
timer: add new feature FixedRandomDelay=
Diffstat (limited to 'src/core/dbus-timer.c')
-rw-r--r--src/core/dbus-timer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
index 9720237140..8e69c17327 100644
--- a/src/core/dbus-timer.c
+++ b/src/core/dbus-timer.c
@@ -131,6 +131,7 @@ const sd_bus_vtable bus_timer_vtable[] = {
SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Timer, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("AccuracyUSec", "t", bus_property_get_usec, offsetof(Timer, accuracy_usec), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("RandomizedDelayUSec", "t", bus_property_get_usec, offsetof(Timer, random_usec), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("FixedRandomDelay", "b", bus_property_get_bool, offsetof(Timer, fixed_random_delay), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Persistent", "b", bus_property_get_bool, offsetof(Timer, persistent), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("WakeSystem", "b", bus_property_get_bool, offsetof(Timer, wake_system), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("RemainAfterElapse", "b", bus_property_get_bool, offsetof(Timer, remain_after_elapse), SD_BUS_VTABLE_PROPERTY_CONST),
@@ -232,6 +233,9 @@ static int bus_timer_set_transient_property(
if (streq(name, "RandomizedDelayUSec"))
return bus_set_transient_usec(u, name, &t->random_usec, message, flags, error);
+ if (streq(name, "FixedRandomDelay"))
+ return bus_set_transient_bool(u, name, &t->fixed_random_delay, message, flags, error);
+
if (streq(name, "WakeSystem"))
return bus_set_transient_bool(u, name, &t->wake_system, message, flags, error);