[Top][All Lists]

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

Re: m4/clock_time.m4 from r117596

From: Paul Eggert
Subject: Re: m4/clock_time.m4 from r117596
Date: Thu, 31 Jul 2014 22:54:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Dmitry Antipov wrote:
Are you sure about that?  On my (Fedora 20) system, 'man timer_settime' and
'man timerfd_settime' says nothing about resolution and rounding.

It's a POSIX requirement for timer_settime, and I expect timerfd_settime to be similar. I'd be surprised if the Linux kernel did it any differently.

A bit of reflection should make it clear why this is so (and why clock_settime is different): an application must always allow for the act of computation to advance the clock a little bit, so if the system rounds timers up and clocks down it won't hurt apps any more than they're hurt already simply by running.

Here's the POSIX requirement:

"Time values that are between two consecutive non-negative integer multiples of the resolution of the specified timer shall be rounded up to the larger multiple of the resolution."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]