On quarta-feira, 15 de junho de 2016 17:44:46 PDT Gregg Reynolds wrote:
> On Wed, Jun 15, 2016 at 5:24 PM, Thiago Macieira <thiago.macieira at 
> intel.com>
> wrote:
> > On quarta-feira, 15 de junho de 2016 16:42:16 PDT Gregg Reynolds wrote:
> > > Here's a nutty idea: just use time().  Does Iotivity really need
> > 
> > sub-second
> > 
> > > timing? I don't know the code that well but I'm going to go out on a
> > > limb
> > > and say no.
> > 
> > We may need monotonic timing, though.
> 
> Strictly speaking I suppose we always want monotonic timing to measure
> elapsed time.  But CLOCK_MONOTONIC is optional.  What if it's not there?

Then we fall back to wall-clock timing. But all major OSes have a monotonic 
clock.

We're far more likely to run into a device that has *no* clock than one that 
has wall-clock but no monotonic.

> In any case, it seems useful to make a distinction between sub-second
> timing and monotonic timing.

True, but we probably do need sub-second timing. Many CoAP timings are 
measured in milliseconds (tens or hundreds of). Full-second isn't enough, 
since delayed replies would take too long to arrive.

> Also, I've recently discovered the concept of "tickless kernel".  Is that
> relevant? I'm guessing no, but I've been wrong befores.

Not for us and not now, no.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Reply via email to