This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77 second function always returns 0.0 on mingw32/egcs-1.1


The fortran function second() always returns 0.0 on mingw32/egcs-1.1.
second() uses etime() which isn't ANSI and doesn't seem to be present in
mingw32,
so it defaults to zero.

mingw32 does have the clock() function, so we could do something like

double G77_etime_0 (real tarray[2]
{
  tarray[0] = ((real)clock()) / CLOCK_PER_SEC;  /* user time */
  tarray[1] = 0.0; /* system time */
  return (tarray[0]+tarray[1]);
}

Any comments before I try it?

+++++++++++++++++++++++++++++++++++++++++
(Mr) David Billinghurst
Comalco Research and Technical Support
PO Box 316, Thomastown, Vic, Australia, 3074
Phone:	+61 3 9469 0642
FAX:	+61 3 9462 2700
Email:	David.Billinghurst@riotinto.com.au



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]