[PATCH libinput] evdev: set CLOCK_MONOTONIC as the time source

Peter Hutterer peter.hutterer at who-t.net
Wed Feb 19 16:54:58 PST 2014

On Tue, Feb 18, 2014 at 07:44:54PM -0800, Thiago Macieira wrote:
> Em ter 18 fev 2014, às 22:33:26, Jasper St. Pierre escreveu:
> > ... and what if it fails? I'd say that requiring CLOCK_MONOTONIC is fine.
> > 
> > Are there any popular Linux setups that don't have CLOCK_MONOTONIC?
> I'm guessing that some weird and niche embedded boards might not support it. 
> Which is a use-case for libinput.
> However, I'm guessing that it's ok to let the ioctl fail. No need to check if 
> it will fail, simply let it.

if the ioctl fails the time reported will be in CLOCK_REALTIME, which is the
default. So aside from optionally printing an error there isn't much of a
recovery path anyway, I don't think failing to set the clock id is a fatal
condition for a device.


More information about the wayland-devel mailing list