summaryrefslogtreecommitdiff
path: root/src/core/dbus-timer.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-02-02 17:32:31 +0100
committerDaniel Mack <github@zonque.org>2016-02-02 17:32:31 +0100
commit14ddf4207ffece3b0843bd1250a64c41c32ac9ae (patch)
tree4f6863c989de0b55f7305464c154011578e72cc6 /src/core/dbus-timer.c
parentb72190e90f0846956e609075fb9113dba9bc8f0f (diff)
parent2c29d3324dbcab7720cc6bb5852b1a01daa6772c (diff)
Merge pull request #2506 from poettering/resolved-and-more
pid 1 fixes, resolved fixes, and more
Diffstat (limited to 'src/core/dbus-timer.c')
-rw-r--r--src/core/dbus-timer.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
index ec301df6d7..321ed5da37 100644
--- a/src/core/dbus-timer.c
+++ b/src/core/dbus-timer.c
@@ -267,19 +267,19 @@ static int bus_timer_set_transient_property(
return 1;
- } else if (streq(name, "AccuracySec")) {
-
+ } else if (STR_IN_SET(name, "AccuracyUSec", "AccuracySec")) {
usec_t u = 0;
+ if (streq(name, "AccuracySec"))
+ log_notice("Client is using obsolete AccuracySec= transient property, please use AccuracyUSec= instead.");
+
r = sd_bus_message_read(message, "t", &u);
if (r < 0)
return r;
if (mode != UNIT_CHECK) {
- char time[FORMAT_TIMESPAN_MAX];
-
t->accuracy_usec = u;
- unit_write_drop_in_private_format(UNIT(t), mode, name, "%s=%s\n", name, format_timespan(time, sizeof(time), u, USEC_PER_MSEC));
+ unit_write_drop_in_private_format(UNIT(t), mode, name, "AccuracySec=" USEC_FMT "us\n", u);
}
return 1;
@@ -292,10 +292,8 @@ static int bus_timer_set_transient_property(
return r;
if (mode != UNIT_CHECK) {
- char time[FORMAT_TIMESPAN_MAX];
-
t->random_usec = u;
- unit_write_drop_in_private_format(UNIT(t), mode, name, "RandomizedDelaySec=%s\n", format_timespan(time, sizeof(time), u, USEC_PER_MSEC));
+ unit_write_drop_in_private_format(UNIT(t), mode, name, "RandomizedDelaySec=" USEC_FMT "us\n", u);
}
return 1;