linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arve Hjønnevåg" <arve@android.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Daniel Kurtz <djkurtz@google.com>,
	John Stultz <john.stultz@linaro.org>,
	linux-input@vger.kernel.org, Brian Swetland <swetland@google.com>,
	Colin Cross <ccross@android.com>, Dima Zavin <dima@android.com>
Subject: Re: [RFC][PATCH] Input: Add infrastrucutre for selecting clockid for event time stamps.
Date: Mon, 9 Jan 2012 14:49:10 -0800	[thread overview]
Message-ID: <CAMP5XgcuSSdPFv+_p4eapW2rmOr8ik9y3vVpnLhymm=RPiTJwg@mail.gmail.com> (raw)
In-Reply-To: <20120109180421.GE15083@core.coreip.homeip.net>

On Mon, Jan 9, 2012 at 10:04 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Sat, Jan 07, 2012 at 02:42:32PM +0800, Daniel Kurtz wrote:
>> On Sat, Jan 7, 2012 at 11:40 AM, John Stultz <john.stultz@linaro.org> wrote:
>> >  static void evdev_pass_event(struct evdev_client *client,
>> > -                            struct input_event *event)
>> > +                            struct input_event *event,
>> > +                            ktime_t mono, ktime_t real)
>> >  {
>> > +       struct timespec ts;
>> > +
>> > +       if (client->timestamp_clkid == CLOCK_MONOTONIC)
>> > +               ts = ktime_to_timespec(mono);
>> > +       else
>> > +               ts = ktime_to_timespec(real);
>> > +       event->time.tv_sec = ts.tv_sec;
>> > +       event->time.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
>>
>> Maybe just:
>>
>>  event->time = (client->timestamp_clkid == CLOCK_MONOTONIC) ?
>>                       ktime_to_timeval(mono) : ktime_to_timeval(real);
>>
>> Either way, lgtm...
>>
>> Reviewed-by: Daniel Kurtz <djkurtz@google.com>
>>
>
> I'm OK with the patch but do we actually have a buy-in from
> Android/Chrome folks for this? If they will actually use it I'll apply
> it, otherwise I'll sit on it.
>

Yes, this seems reasonable to me.

-- 
Arve Hjønnevåg
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-01-09 22:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07  3:40 [RFC][PATCH] Input: Add infrastrucutre for selecting clockid for event time stamps John Stultz
2012-01-07  6:42 ` Daniel Kurtz
2012-01-09 18:04   ` Dmitry Torokhov
     [not found]     ` <CAGS+omDkkH_cVQV4CvF1iz-aSRdNTGcsEghXU3MNBLAgsp7jFA@mail.gmail.com>
2012-01-09 18:48       ` Dmitry Torokhov
2012-01-09 22:49     ` Arve Hjønnevåg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-06  2:50 John Stultz
2012-01-06  9:20 ` Daniel Kurtz
2012-01-06 19:39   ` John Stultz

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='CAMP5XgcuSSdPFv+_p4eapW2rmOr8ik9y3vVpnLhymm=RPiTJwg@mail.gmail.com' \
    --to=arve@android.com \
    --cc=ccross@android.com \
    --cc=dima@android.com \
    --cc=djkurtz@google.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=swetland@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).