diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2006-09-29 22:21:53 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2006-09-29 22:21:53 +0000 |
commit | d68d3a3d4b7e1faff338581acdcba99d62be37a2 (patch) | |
tree | 6152eaff809d423601fd290a1afba7817d1f7540 /libgfortran | |
parent | be14fe72cbae6192bfa999ce25e07ecb0e53fc5f (diff) | |
download | gcc-d68d3a3d4b7e1faff338581acdcba99d62be37a2.zip gcc-d68d3a3d4b7e1faff338581acdcba99d62be37a2.tar.gz gcc-d68d3a3d4b7e1faff338581acdcba99d62be37a2.tar.bz2 |
cpu_time.c: Add cpu_time_10 and cpu_time_16 routines.
2006-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
* intrinsics/cpu_time.c: Add cpu_time_10 and cpu_time_16 routines.
From-SVN: r117320
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 4 | ||||
-rw-r--r-- | libgfortran/intrinsics/cpu_time.c | 24 |
2 files changed, 28 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8474463..8b51599 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2006-09-29 Steven G. Kargl <kargl@gcc.gnu.org> + + * intrinsics/cpu_time.c: Add cpu_time_10 and cpu_time_16 routines. + 2006-09-28 Francois-Xavier Coudert <coudert@clipper.ens.fr> * Makefile.am: Install libgfortranbegin inside compiler libraries diff --git a/libgfortran/intrinsics/cpu_time.c b/libgfortran/intrinsics/cpu_time.c index 8469a43..baee1f4 100644 --- a/libgfortran/intrinsics/cpu_time.c +++ b/libgfortran/intrinsics/cpu_time.c @@ -171,6 +171,30 @@ void cpu_time_8 (GFC_REAL_8 *time) *time = sec + usec * (GFC_REAL_8)1.e-6; } +#ifdef HAVE_GFC_REAL_10 +extern void cpu_time_10 (GFC_REAL_10 *); +export_proto(cpu_time_10); + +void cpu_time_10 (GFC_REAL_10 *time) +{ + long sec, usec; + __cpu_time_1 (&sec, &usec); + *time = sec + usec * (GFC_REAL_10)1.e-6; +} +#endif + +#ifdef HAVE_GFC_REAL_16 +extern void cpu_time_16 (GFC_REAL_16 *); +export_proto(cpu_time_16); + +void cpu_time_16 (GFC_REAL_16 *time) +{ + long sec, usec; + __cpu_time_1 (&sec, &usec); + *time = sec + usec * (GFC_REAL_16)1.e-6; +} +#endif + extern void second_sub (GFC_REAL_4 *); export_proto(second_sub); |