* m4/clock_time.m4 from r117596
@ 2014-07-28 6:31 Dmitry Antipov
2014-07-31 20:19 ` Paul Eggert
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Antipov @ 2014-07-28 6:31 UTC (permalink / raw)
To: Paul Eggert; +Cc: Emacs development discussions
IIUC this should be incorporated into gnulib.
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: m4/clock_time.m4 from r117596
2014-07-28 6:31 m4/clock_time.m4 from r117596 Dmitry Antipov
@ 2014-07-31 20:19 ` Paul Eggert
2014-08-01 5:43 ` Dmitry Antipov
0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2014-07-31 20:19 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Emacs development discussions
Dmitry Antipov wrote:
> IIUC this should be incorporated into gnulib.
Thanks for the heads-up, but isn't that change unnecessary?
timer_settime and timerfd_settime already round clocks up to the nearest
value supported by the system resolution, so there should be no need for
Emacs to call clock_getres and round the clocks by hand.
I gave that a shot, and simplified some other parts of the recent atimer
changes, in trunk bzr 117616.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: m4/clock_time.m4 from r117596
2014-07-31 20:19 ` Paul Eggert
@ 2014-08-01 5:43 ` Dmitry Antipov
2014-08-01 5:54 ` Paul Eggert
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Antipov @ 2014-08-01 5:43 UTC (permalink / raw)
To: Paul Eggert; +Cc: Emacs development discussions
On 08/01/2014 12:19 AM, Paul Eggert wrote:
> timer_settime and timerfd_settime already round clocks up to the nearest
> value supported by the system resolution
Are you sure about that? On my (Fedora 20) system, 'man timer_settime' and
'man timerfd_settime' says nothing about resolution and rounding. But 'man
clock_settime' says:
"If the time value pointed to by the argument tp of clock_settime() is not
a multiple of res, then it is _truncated_ to a multiple of res."
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: m4/clock_time.m4 from r117596
2014-08-01 5:43 ` Dmitry Antipov
@ 2014-08-01 5:54 ` Paul Eggert
0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggert @ 2014-08-01 5:54 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Emacs development discussions
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."
http://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_settime.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-01 5:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 6:31 m4/clock_time.m4 from r117596 Dmitry Antipov
2014-07-31 20:19 ` Paul Eggert
2014-08-01 5:43 ` Dmitry Antipov
2014-08-01 5:54 ` Paul Eggert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.