[etherlab-dev] Sanity check: default send interval
Gavin Lambert
gavinl at compacsort.com
Wed Feb 11 23:50:01 CET 2015
On 11 February 2015 23:42, quoth Frank Heckenbach:
> > In master/master.c's ec_master_init (line 213 in my patched version;
> > line
> > 211 in stable-1.5) there's the following line:
> >
> > ec_master_set_send_interval(master, 1000000 / HZ);
> >
> > According to the definition further down and the docs, that second
> > parameter is supposed to be the time between master application cycles
> > in microseconds, which is used to calculate a few queue sizes and also
> > to control the master thread sleep time if EC_USE_HRTIMER is defined
> > (via configure --enable-hrtimer).
> >
> > Doesn't the use of HZ above mean that this is actually calculating
> > "how many seconds is 1000000 jiffies"
>
> Which is the same as "how many microseconds is 1 jiffy". So sleeping for
this
> many microseconds is as close as possible to the non-hrtimer code which
> sleeps for 1 jiffy.
Thanks, that makes more sense now.
More information about the etherlab-dev
mailing list