Re: [RFC][PATCH] Input: Add infrastrucutre for selecting clockid for event time stamps.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 9, 2012 at 10:04 AM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> 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@xxxxxxxxxx> 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@xxxxxxxxxx>
>>
>
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux