diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-10 21:16:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-10 21:22:59 +0200 |
commit | c2ba3ad6604ef2e189d7e0a36d6911116e84d3ab (patch) | |
tree | 195bd9feba12c118a6b35fc5aa4710e681d757b2 /src/core/dbus-scope.c | |
parent | 5a045dad1c5adf17d9198b15d085c9425c1dae8e (diff) |
event: add timer accuracy/coalescing logic
In order to improve energy consumption we should minimize our wake-ups
when handling timers. Hence, for each timer take an accuracy value and
schedule the actual wake-up time somewhere between the specified time
and the specified timer plus the accuracy.
The specified time of timer event sources hence becomes the time the
handler is called the *earliest*, and the specified time plus the accuracy
the time by which it is called the *latest*, leaving the library the
freedom to schedule the wake-up somewhere inbetween.
If the accuracy is specified as 0 the default of 250ms will be used.
When scheduling timeouts we will now try to elapse them at the same
point within each second, across the entire system. We do this by using
a fixed perturbation value keyed off the boot id. If this point within a
second is not in the acceptable range, we try again with a fixed time
within each 250ms time step. If that doesn't work either, we wake up at
the last possible time.
Diffstat (limited to 'src/core/dbus-scope.c')
0 files changed, 0 insertions, 0 deletions