clock_getres.2: Add linux specific clock ids
PATCH 1/1 clock_getres.2: Add linux specific clock ids
Hi!
Attached patch adds following clock ids:
CLOCK_REALTIME_COARSECLOCK_MONOTONIC_COARSECLOCK_BOOTTIME
Signature · 2 lines
Cyril Hrubis [email protected]
Quoted 1 line
From
2cf31b0e19c15f093e060ef1b5f2f9ca0f42888dMon Sep 17 00:00:00 2001
From: Cyril Hrubis <[email protected]>
Date: Wed, 20 Feb 2013 17:52:52 +0100
Subject: [PATCH] clock_getres.2: Add linux specific clocks.
Add following linux specific clocks:
CLOCK_REALTIME_COARSECLOCK_MONOTONIC_COARSECLOCK_BOOTTIME
--- man2/clock_getres.2 | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-)
man2/clock_getres.2 +19 -2
@@ -27,8 +27,6 @@ .\" 2003-08-24 aeb, large parts rewritten .\" 2004-08-06 Christoph Lameter <clameter-sJ/[email protected]>, SMP note .\" -.\" FIXME: Linux 2.6.39 adds CLOCK_BOOTTIME -.\" .TH CLOCK_GETRES 2 2012-11-07 "" "Linux Programmer's Manual" .SH NAME clock_getres, clock_gettime, clock_settime \- clock and time functions
@@ -130,6 +128,12 @@ and by the incremental adjustments performed by .BR adjtime (3) and NTP. .TP +.BR CLOCK_REALTIME_COARSE " (since Linux 2.6.32; Linux-specific)" +.\" Added in commit da15cfdae03351c689736f8d142618592e3cebc3 +Faster but less precise version of +.BR CLOCK_REALTIME. +Use when you need very fast, but not fine-grained timestamps. +.TP .B CLOCK_MONOTONIC Clock that cannot be set and represents monotonic time since some unspecified starting point.
@@ -148,6 +152,19 @@ that is not subject to NTP adjustments or the incremental adjustments performed by .BR adjtime (3). .TP +.BR CLOCK_MONOTONIC_COARSE " (since Linux 2.6.32; Linux-specific)" +.\" Added in commit da15cfdae03351c689736f8d142618592e3cebc3 +Faster but less precise version of +.BR CLOCK_MONOTONIC. +Use when you need very fast, but not fine-grained timestamps. +.TP +.BR CLOCK_BOOTTIME " (since Linux 2.6.39; Linux-specific)" +.\" Added in commit 7fdd7f89006dd5a4c702fa0ce0c272345fa44ae0 +Identical to +.BR CLOCK_MONOTONIC , +except it also includes any time spent in suspend. This allows applications to +get a suspend aware monotonic clock. +.TP .B CLOCK_PROCESS_CPUTIME_ID High-resolution per-process timer from the CPU. .TP
Signature · 1 line
1.7.8.6
Hello Cyril,
Quoted 6 lines · On Wed, Feb 20, 2013 at 6:01 PM, <[email protected]> wrote:
Hi!
Attached patch adds following clock ids:
CLOCK_REALTIME_COARSECLOCK_MONOTONIC_COARSECLOCK_BOOTTIME
Thanks for these patches. I've applied. Note that I do like to get patches inline, for review purposes (and you can attach them also, if you are worried about mailers breaking something).
Thanks also for including the commit hashes. I think the CLOCK_BOOTIME has should however be 70a08cca1227dc31c784ec930099a4417a06e7d0 and I amended accordingly.
Cheers,
Michael
man2/clock_getres.2 +19 -2
@@ -27,8 +27,6 @@ .\" 2003-08-24 aeb, large parts rewritten .\" 2004-08-06 Christoph Lameter <clameter-sJ/[email protected]>, SMP note .\" -.\" FIXME: Linux 2.6.39 adds CLOCK_BOOTTIME -.\" .TH CLOCK_GETRES 2 2012-11-07 "" "Linux Programmer's Manual" .SH NAME clock_getres, clock_gettime, clock_settime \- clock and time functions
@@ -130,6 +128,12 @@ and by the incremental adjustments performed by .BR adjtime (3) and NTP. .TP +.BR CLOCK_REALTIME_COARSE " (since Linux 2.6.32; Linux-specific)" +.\" Added in commit da15cfdae03351c689736f8d142618592e3cebc3 +Faster but less precise version of +.BR CLOCK_REALTIME. +Use when you need very fast, but not fine-grained timestamps. +.TP .B CLOCK_MONOTONIC Clock that cannot be set and represents monotonic time since some unspecified starting point.
@@ -148,6 +152,19 @@ that is not subject to NTP adjustments or the incremental adjustments performed by .BR adjtime (3). .TP +.BR CLOCK_MONOTONIC_COARSE " (since Linux 2.6.32; Linux-specific)" +.\" Added in commit da15cfdae03351c689736f8d142618592e3cebc3 +Faster but less precise version of +.BR CLOCK_MONOTONIC. +Use when you need very fast, but not fine-grained timestamps. +.TP +.BR CLOCK_BOOTTIME " (since Linux 2.6.39; Linux-specific)" +.\" Added in commit 7fdd7f89006dd5a4c702fa0ce0c272345fa44ae0 +Identical to +.BR CLOCK_MONOTONIC , +except it also includes any time spent in suspend. This allows applications to +get a suspend aware monotonic clock. +.TP .B CLOCK_PROCESS_CPUTIME_ID High-resolution per-process timer from the CPU. .TP
Signature · 5 lines
1.7.8.6 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAki91M-Nor=uGpLj-CdmQ0dmXQC7__MHcg6jhn8brkq3pQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi!
Quoted 3 lines
Thanks for these patches. I've applied. Note that I do like to get patches inline, for review purposes (and you can attach them also, if you are worried about mailers breaking something).
Ah, sorry, I've forgotten again.
Quoted 3 lines
Thanks also for including the commit hashes. I think the
CLOCK_BOOTIMEhas should however be70a08cca1227dc31c784ec930099a4417a06e7d0and I amended accordingly.
That depends, if I'm not misreading the code, the commit hash I've added (7fdd7f) made the clock available via the POSIX clock interface. Which is in my opinion the time where it became available to the userspace.
On the other hand both of the commits are from the same rc so this does not make any difference for the availability of the clock id and either of them is fine.
Signature · 6 lines
Cyril Hrubis [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · On Wed, Feb 27, 2013 at 12:58 PM, <[email protected]> wrote:
Hi!
Quoted 3 lines
Thanks for these patches. I've applied. Note that I do like to get patches inline, for review purposes (and you can attach them also, if you are worried about mailers breaking something).
Ah, sorry, I've forgotten again.
Quoted 3 lines
Thanks also for including the commit hashes. I think the
CLOCK_BOOTIMEhas should however be70a08cca1227dc31c784ec930099a4417a06e7d0and I amended accordingly.
Quoted 7 lines
That depends, if I'm not misreading the code, the commit hash I've added (7fdd7f) made the clock available via the POSIX clock interface. Which is in my opinion the time where it became available to the userspace.
On the other hand both of the commits are from the same rc so this does not make any difference for the availability of the clock id and either of them is fine.
Good point. I've added a reference to both commits into the source of the page.
Thanks,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html