All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: ELL API changes before stabilizing
Date: Thu, 06 Oct 2016 13:51:21 -0500	[thread overview]
Message-ID: <57F69D29.3000906@gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.20.1610061013210.28728@mjmartin-mac01.local>

[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]

Hi Mat,

 >
> My whole point here is that I see it as a favorable tradeoff to pass an
> extra '0' to the timeout APIs when subsecond resolution is not required
> rather than have superfluous API calls. It's only a matter of what ELL
> users see in their code, not code efficiency: the current whole-second
> APIs are just wrappers around full-resolution common code anyway. If the
> whole-seconds use case is overly impacted by the extra parameter, then
> the tradeoff may not be favorable.

That is really what I meant.  I want to save the users from typing the 
extra 0 parameter unnecessarily.  We already have 4 arguments to 
l_timeout_create, with lots of potential zeros.

> I agree that nanoseconds are overkill, but I don't mind seeing the
> platform detail filter up to the ELL API level. In practice,
> milliseconds are likely sufficient and would save a lot of '0' keypresses.
>

Hence my question.  Do we actually need to expose nanoseconds?  I can't 
believe someone needs that level of precision.  MS is fine.

If we add the range stuff in, then that's another argument or two, 
depending on representation.

I actually don't mind multiple constructors. They're just shorthands and 
are easier to read than trying to parse the arguments.  We can include a 
range fudge factor as part of the API.  e.g. second version of 
timeout_create fudges by +/- 500ms.  MS versions can fudge by +/- 500 
nanoseconds, etc.

And if someone wants full control, then a full-blown provide-everything 
constructor can be added.

Regards,
-Denis


  parent reply	other threads:[~2016-10-06 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 21:45 ELL API changes before stabilizing Mat Martineau
2016-10-05 22:33 ` Denis Kenzior
2016-10-06 16:36   ` Mat Martineau
2016-10-06 17:03     ` Denis Kenzior
2016-10-06 18:15       ` Mat Martineau
2016-10-06 18:21         ` Marcel Holtmann
2016-10-07 18:42           ` Mat Martineau
2016-10-06 18:22         ` Gix, Brian
2016-10-06 18:51         ` Denis Kenzior [this message]
2016-10-07 18:05           ` Mat Martineau
2016-10-07 18:41             ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57F69D29.3000906@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ell@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.