utility/timer: Implement

We often need a continually ticking timer for our daemons. This utility
wraps an sd_event time source as a convenience. This is meant to be a
usable replacement for the timer.hpp found in other openbmc projects.

Tested:
    New tests pass with full coverage. Changes to the phosphor-watchdog
    that rely on this utility work as expected.

Change-Id: Id12aed9e5b018e7eca825c4a7ac7b4f46e2f04c6
Signed-off-by: William A. Kennington III <wak@google.com>
6 files changed
tree: a90e97f1e1e997811038828db65a1e9336b20743
  1. example/
  2. src/
  3. test/
  4. .clang-format
  5. .gitignore
  6. .lcovrc
  7. bootstrap.sh
  8. configure.ac
  9. LICENSE
  10. MAINTAINERS
  11. Makefile.am
  12. README.md
README.md

sdeventplus

sdeventplus is a c++ wrapper around the systemd sd_event apis meant to provide c++ ergonomics to their usage.

Dependencies

The sdeventplus library requires libsystemd for sd-event.

Test cases require google{test,mock}, valgrind, and lcov.

Building

For a standard release build, you want something like:

./bootstrap.sh
./configure --disable-tests
make
make install

For a test / debug build, a typical configuration is

./bootstrap.sh
./configure --enable-tests --enable-coverage --enable-valgrind
make
make check
make check-valgrind
make check-code-coverage