chiark / gitweb /
systemd-python: cleanup up usec_t handling
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Mar 2013 22:40:05 +0000 (18:40 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 22 Mar 2013 02:39:24 +0000 (22:39 -0400)
commit806bc1cb610b1795d62f59878703361c8b576b12
tree02e2d7f78114014d9b6ef27ee3f5bba8e6ebfb97
parent50a279f85783375416dacae7dafbcbbcd2765962
systemd-python: cleanup up usec_t handling

The behaviour wrt. seconds vs. microseconds was inconsistent.
Now _Reader always uses native units (us), while Reader always
uses seconds and accepts both floats and ints. This way the
conversion is always done in the Python layer, and the lower
level API allows access to the journal API without the potentially
lossy conversion between double and uint64_t.
src/python-systemd/_reader.c
src/python-systemd/journal.py