Subject: | more clock_gettime() constants |
From Linux and FreeBSD.
Three attached patches.
Subject: | 0001-cpan-Time-HiRes-sort-the-constants-one-per-line.patch |
From 243a8fb5151235e9d59817c65c53eff09d38b73d Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Wed, 13 Jan 2016 13:01:35 -0500
Subject: [PATCH 1/3] cpan/Time-HiRes: sort the constants, one per line
---
cpan/Time-HiRes/Makefile.PL | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/cpan/Time-HiRes/Makefile.PL b/cpan/Time-HiRes/Makefile.PL
index bbdd7a7..f6fdee6 100644
--- a/cpan/Time-HiRes/Makefile.PL
+++ b/cpan/Time-HiRes/Makefile.PL
@@ -818,16 +818,21 @@ sub doMakefile {
sub doConstants {
if (eval {require ExtUtils::Constant; 1}) {
- my @names = qw(CLOCK_HIGHRES CLOCK_MONOTONIC
- CLOCK_PROCESS_CPUTIME_ID
- CLOCK_REALTIME
- CLOCK_SOFTTIME
- CLOCK_THREAD_CPUTIME_ID
- CLOCK_TIMEOFDAY
- CLOCKS_PER_SEC
- ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF
- ITIMER_REALPROF
- TIMER_ABSTIME);
+ my @names = qw(
+ CLOCKS_PER_SEC
+ CLOCK_HIGHRES
+ CLOCK_MONOTONIC
+ CLOCK_PROCESS_CPUTIME_ID
+ CLOCK_REALTIME
+ CLOCK_SOFTTIME
+ CLOCK_THREAD_CPUTIME_ID
+ CLOCK_TIMEOFDAY
+ ITIMER_PROF
+ ITIMER_REAL
+ ITIMER_REALPROF
+ ITIMER_VIRTUAL
+ TIMER_ABSTIME
+ );
foreach (qw (d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
d_nanosleep d_clock_gettime d_clock_getres
d_clock d_clock_nanosleep d_hires_stat)) {
--
2.7.0
Subject: | 0002-cpan-Time-HiRes-Add-Linux-specific-clock_gettime-con.patch |
From 2185560f38abe23554f8ad99036dc12c78539eae Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Wed, 13 Jan 2016 13:03:07 -0500
Subject: [PATCH 2/3] cpan/Time-HiRes: Add Linux-specific clock_gettime()
constants.
http://man7.org/linux/man-pages/man2/clock_gettime.2.html
---
cpan/Time-HiRes/Makefile.PL | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpan/Time-HiRes/Makefile.PL b/cpan/Time-HiRes/Makefile.PL
index f6fdee6..1c29b70 100644
--- a/cpan/Time-HiRes/Makefile.PL
+++ b/cpan/Time-HiRes/Makefile.PL
@@ -820,10 +820,14 @@ sub doConstants {
if (eval {require ExtUtils::Constant; 1}) {
my @names = qw(
CLOCKS_PER_SEC
+ CLOCK_BOOTTIME
CLOCK_HIGHRES
CLOCK_MONOTONIC
+ CLOCK_MONOTONIC_COARSE
+ CLOCK_MONOTONIC_RAW
CLOCK_PROCESS_CPUTIME_ID
CLOCK_REALTIME
+ CLOCK_REALTIME_COARSE
CLOCK_SOFTTIME
CLOCK_THREAD_CPUTIME_ID
CLOCK_TIMEOFDAY
--
2.7.0
Subject: | 0003-cpan-Time-HiRes-Add-FreeBSD-specific-clock_gettime-c.patch |
From 879c558b53d6697b298c2bcd534c46e830399283 Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Wed, 13 Jan 2016 13:06:28 -0500
Subject: [PATCH 3/3] cpan/Time-HiRes: Add FreeBSD specific clock_gettime()
constants.
https://www.freebsd.org/cgi/man.cgi?query=clock_gettime
---
cpan/Time-HiRes/Makefile.PL | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/cpan/Time-HiRes/Makefile.PL b/cpan/Time-HiRes/Makefile.PL
index 1c29b70..420841c 100644
--- a/cpan/Time-HiRes/Makefile.PL
+++ b/cpan/Time-HiRes/Makefile.PL
@@ -824,13 +824,20 @@ sub doConstants {
CLOCK_HIGHRES
CLOCK_MONOTONIC
CLOCK_MONOTONIC_COARSE
+ CLOCK_MONOTONIC_PRECISE
CLOCK_MONOTONIC_RAW
CLOCK_PROCESS_CPUTIME_ID
CLOCK_REALTIME
CLOCK_REALTIME_COARSE
+ CLOCK_REALTIME_FAST
+ CLOCK_REALTIME_PRECISE
+ CLOCK_SECOND
CLOCK_SOFTTIME
CLOCK_THREAD_CPUTIME_ID
CLOCK_TIMEOFDAY
+ CLOCK_UPTIME
+ CLOCK_UPTIME_FAST
+ CLOCK_UPTIME_PRECISE
ITIMER_PROF
ITIMER_REAL
ITIMER_REALPROF
--
2.7.0