diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2008-03-01 22:15:31 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-03-01 22:15:31 +0000 |
commit | 9bd97567c9897ea1f3f925f0ad0fcb06967a650c (patch) | |
tree | 2108337f5bb1b8a53b4b694ee060c360933a769e | |
parent | 4dbc8575fb0cf24ce4ef60170dd5959f6cdb07b2 (diff) | |
download | gcc-9bd97567c9897ea1f3f925f0ad0fcb06967a650c.zip gcc-9bd97567c9897ea1f3f925f0ad0fcb06967a650c.tar.gz gcc-9bd97567c9897ea1f3f925f0ad0fcb06967a650c.tar.bz2 |
re PR libfortran/35355 (CPU_TIME gives wrong values on mingw)
2008-03-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/35355
* intrinsics/time_1.h (__time_1): Fix calculation of user_usec
for mingw.
From-SVN: r132808
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/intrinsics/time_1.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8ed3624..8434c23 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2008-03-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + PR libfortran/35355 + * intrinsics/time_1.h (__time_1): Fix calculation of user_usec + for mingw. + 2008-03-01 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/35063 diff --git a/libgfortran/intrinsics/time_1.h b/libgfortran/intrinsics/time_1.h index 43e6d89..93b3d2d 100644 --- a/libgfortran/intrinsics/time_1.h +++ b/libgfortran/intrinsics/time_1.h @@ -104,10 +104,10 @@ __time_1 (long *user_sec, long *user_usec, long *system_sec, long *system_usec) &kernel_time.ft, &user_time.ft); *user_sec = user_time.ulltime / 10000000; - *user_usec = user_time.ulltime % 10000000; + *user_usec = (user_time.ulltime % 10000000) / 10; *system_sec = kernel_time.ulltime / 10000000; - *system_usec = kernel_time.ulltime % 10000000; + *system_usec = (kernel_time.ulltime % 10000000) / 10; return 0; } |