From: Linus Torvalds <torvalds@linux-foundation.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Nicholas Miell <nmiell@comcast.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch 6/9] signalfd/timerfd v1 - timerfd core ...
Date: Sat, 10 Mar 2007 21:35:54 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0703102132240.10330@woody.linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0703101938150.3613@alien.or.mcafeemobile.com>
On Sat, 10 Mar 2007, Davide Libenzi wrote:
> On Sat, 10 Mar 2007, Linus Torvalds wrote:
>
> > (That said, using "struct itimerspec" might be a good idea. That would
> > also obviate the need for TFD_TIMER_SEQ, since an itimerspec automatically
> > has both "base" and "incremental" parts).
>
> But TFD_TIMER_SEQ is a simple auto-rearm case of TFD_TIMER_REL. So the
> timespec is sufficent too (in all three cases we just need *one* time).
Well, people actually do use itimers like "give me a timer every second,
starting five seconds from now".
> Actually, the only place where I can find the itimerspec usefull, is
> indeed with TFD_TIMER_SEQ. In cases where you want you clock starting at a
> given time (it_value) *and* with the given frequency (it_interval).
.. and this is where itimerspec is even better: once you have absolute
time, *and* a process that might miss ticks (because it does something
else), the "absolute time start + interval" thing can avoid drifting
(which a "relative interval" has a really hard time doing).
So if you want a "timer tick every second, *on* the second" kind of
interface, you really do want a absolute time starting point, and then a
fixed interval. Two different times.
Linus
next prev parent reply other threads:[~2007-03-11 5:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 23:41 Davide Libenzi
2007-03-10 6:33 ` Nicholas Miell
2007-03-10 6:38 ` Davide Libenzi
2007-03-10 6:43 ` Nicholas Miell
2007-03-10 6:53 ` Davide Libenzi
2007-03-10 7:09 ` Nicholas Miell
2007-03-10 7:36 ` Davide Libenzi
2007-03-10 19:52 ` Nicholas Miell
2007-03-10 20:41 ` Davide Libenzi
2007-03-10 21:01 ` Nicholas Miell
2007-03-10 21:44 ` Linus Torvalds
2007-03-10 21:56 ` Nicholas Miell
2007-03-10 22:42 ` Linus Torvalds
2007-03-11 0:25 ` Nicholas Miell
2007-03-11 0:35 ` Linus Torvalds
2007-03-11 1:49 ` Nicholas Miell
2007-03-11 1:57 ` Davide Libenzi
2007-03-11 2:09 ` Nicholas Miell
2007-03-11 5:31 ` Linus Torvalds
2007-03-11 6:18 ` Nicholas Miell
2007-03-11 16:29 ` Linus Torvalds
2007-03-11 3:42 ` Davide Libenzi
2007-03-11 5:35 ` Linus Torvalds [this message]
2007-03-11 5:44 ` Davide Libenzi
2007-03-10 22:30 ` Davide Libenzi
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=Pine.LNX.4.64.0703102132240.10330@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nmiell@comcast.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®