chiark / gitweb /
core: fix handling of AccuracyUSec and RandomDelayUSec bus properties
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Feb 2016 20:27:33 +0000 (21:27 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 17 May 2017 13:22:15 +0000 (15:22 +0200)
commit0f23ea0bef55d39322dcd3b73a7613efaa8e5b61
tree14715ae3445c719a973da232471096e28071b6bb
parent8d20404363bab2f394e583a0902ba4d3fdda453a
core: fix handling of AccuracyUSec and RandomDelayUSec bus properties

Clear up some confusion regarding the USec and Sec suffixes we use. In configuration files we usually use the Sec
suffix, to indicate the implied time unit if none is specified. The respective bus properties however use the USec
property, since they expose 64bit unsigned integers containing time in µs.

Before this patch timer units exposed a bus property AccuracyUSec (which hence is the correct name) but when parsing
transient property data would look for AccuracySec instead (which is incorrect). This patch ensures we look for
AccuracySec correctly, but keeps the code for AccuracyUSec in place for compatibility, but adds a warning to ensure
that apps are updated to use the right property.
src/shared/bus-util.c