[systemd-devel] [PATCH] conf parser: introduce milisecond parsing

Lennart Poettering lennart at poettering.net
Wed Jul 16 08:11:46 PDT 2014


On Wed, 16.07.14 16:28, Susant Sahani (susant at redhat.com) wrote:

> 
> On 07/16/2014 01:07 PM, Susant Sahani wrote:
> >Add millisecord parsing support to conf parser.
> >
> >Immediate usage of this function is to parse bond options
> >such as MIIMonitor, UpDelayMSec, DownDelayMSec which is
> >represented in milli seconds.
> 
> Dropped the idea. Please ignore the patch.

Soem background, for the sake of the mailing list archives:

Our generic parser implies seconds as units, but if another unit is
specified it will honour that. The parsing code will always parse things
as accuracte as 1us into a usec_t.

This is documented in systemd.time(7). 

We also have a second parser, which has nanosecond granularity, since we
cannot use the usual usec_t for that, but need to use nsec_t...

Explicit parsers for the various other time units should not be
necessary, the normal second-parser should be good enough.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list